You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2009/08/31 12:24:58 UTC

svn commit: r809530 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java

Author: lektran
Date: Mon Aug 31 10:24:58 2009
New Revision: 809530

URL: http://svn.apache.org/viewvc?rev=809530&view=rev
Log:
Changed the reloadCrashedJobs method to look for crashed jobs by statusId rather than null finish and cancel dates

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=809530&r1=809529&r2=809530&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java Mon Aug 31 10:24:58 2009
@@ -210,9 +210,11 @@
         String instanceId = UtilProperties.getPropertyValue("general.properties", "unique.instanceId", "ofbiz0");
         List<GenericValue> crashed = null;
 
-        List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition("finishDateTime", null));
-        exprs.add(EntityCondition.makeCondition("cancelDateTime", null));
-        exprs.add(EntityCondition.makeCondition("runByInstanceId", instanceId));
+        List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition("runByInstanceId", instanceId));
+        List<String> openStatuses = UtilMisc.toList("SERVICE_PENDING",
+                                                    "SERVICE_QUEUED",
+                                                    "SERVICE_RUNNING");
+        exprs.add(EntityCondition.makeCondition("statusId", EntityOperator.IN, openStatuses));
         EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(exprs);
 
         try {