You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/12/23 17:39:23 UTC
svn commit: r1647613 - in /manifoldcf/branches/release-2.0-branch: ./
framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java
Author: kwright
Date: Tue Dec 23 16:39:23 2014
New Revision: 1647613
URL: http://svn.apache.org/r1647613
Log:
More CONNECTORS-1128 fixes
Modified:
manifoldcf/branches/release-2.0-branch/ (props changed)
manifoldcf/branches/release-2.0-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java
Propchange: manifoldcf/branches/release-2.0-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 23 16:39:23 2014
@@ -119,4 +119,4 @@
/manifoldcf/branches/CONNECTORS-981:1605049-1605773
/manifoldcf/branches/CONNECTORS-989:1611600-1612101
/manifoldcf/branches/CONNECTORS-990:1610284-1610707
-/manifoldcf/trunk:1644252,1644399,1644538,1644920,1644931,1646317,1646397,1646403,1646640,1646947,1647574,1647577
+/manifoldcf/trunk:1644252,1644399,1644538,1644920,1644931,1646317,1646397,1646403,1646640,1646947,1647574,1647577,1647608
Modified: manifoldcf/branches/release-2.0-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java?rev=1647613&r1=1647612&r2=1647613&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java (original)
+++ manifoldcf/branches/release-2.0-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java Tue Dec 23 16:39:23 2014
@@ -517,7 +517,7 @@ public class JobQueue extends org.apache
}
/** Flip all records for a job that have status HOPCOUNTREMOVED back to PENDING.
- * NOTE: We need to actually schedule these!!! so the following can't really work. ???
+ * NOTE: We need to actually schedule these!!! so the following can't really work.
*/
public void reactivateHopcountRemovedRecords(Long jobID)
throws ManifoldCFException
@@ -525,6 +525,8 @@ public class JobQueue extends org.apache
Map map = new HashMap();
// Map HOPCOUNTREMOVED to PENDING
map.put(statusField,statusToString(STATUS_PENDING));
+ map.put(needPriorityField,needPriorityToString(NEEDPRIORITY_TRUE));
+ map.put(needPriorityProcessIDField,null);
map.put(checkTimeField,new Long(0L));
ArrayList list = new ArrayList();
String query = buildConjunctionClause(list,new ClauseDescription[]{
@@ -772,6 +774,7 @@ public class JobQueue extends org.apache
HashMap map = new HashMap();
map.put(statusField,statusToString(STATUS_PENDINGPURGATORY));
map.put(needPriorityField,needPriorityToString(NEEDPRIORITY_TRUE));
+ map.put(needPriorityProcessIDField,null);
// Do not reset priorities here! They should all be blank at this point.
map.put(checkTimeField,new Long(0L));
map.put(checkActionField,actionToString(ACTION_RESCAN));
@@ -830,6 +833,7 @@ public class JobQueue extends org.apache
HashMap map = new HashMap();
map.put(statusField,statusToString(STATUS_PENDINGPURGATORY));
map.put(needPriorityField,needPriorityToString(NEEDPRIORITY_TRUE));
+ map.put(needPriorityProcessIDField,null);
// Do not reset priorities here! They should all be blank at this point.
map.put(checkTimeField,new Long(0L));
map.put(checkActionField,actionToString(ACTION_RESCAN));
@@ -944,8 +948,7 @@ public class JobQueue extends org.apache
new UnitaryClause(jobIDField,jobID),
new MultiClause(statusField,new Object[]{
statusToString(STATUS_PENDING),
- statusToString(STATUS_PENDINGPURGATORY),
- statusToString(STATUS_HOPCOUNTREMOVED)})});
+ statusToString(STATUS_PENDINGPURGATORY)})});
performUpdate(map,"WHERE "+query,list,null);
noteModifications(0,1,0);
}
@@ -973,6 +976,7 @@ public class JobQueue extends org.apache
{
HashMap map = new HashMap();
map.put(needPriorityField,needPriorityToString(NEEDPRIORITY_TRUE));
+ map.put(needPriorityProcessIDField,null);
map.put(docPriorityField,nullDocPriority);
ArrayList list = new ArrayList();
String query = buildConjunctionClause(list,new ClauseDescription[]{
@@ -1047,8 +1051,11 @@ public class JobQueue extends org.apache
{
case STATUS_ACTIVE:
case STATUS_ACTIVEPURGATORY:
- // Mark as hopcountremove
+ // Mark as hopcountremove (and remove its priority too)
newStatus = STATUS_HOPCOUNTREMOVED;
+ map.put(needPriorityField,needPriorityToString(NEEDPRIORITY_FALSE));
+ map.put(needPriorityProcessIDField,null);
+ map.put(docPriorityField,nullDocPriority);
actionFieldValue = actionToString(ACTION_RESCAN);
checkTimeValue = new Long(0L);
rval = true;