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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

lektran
Author: lektran
Date: Fri Jan 15 17:07:00 2010
New Revision: 899715

URL: http://svn.apache.org/viewvc?rev=899715&view=rev
Log:
When reloading crashed jobs, only check for jobs with a SERVICE_RUNNING status, pending and queued jobs will get picked up by the next poll so there is no need to reload them.

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=899715&r1=899714&r2=899715&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 Fri Jan 15 17:07:00 2010
@@ -211,10 +211,7 @@
         List<GenericValue> crashed = null;
 
         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));
+        exprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "SERVICE_RUNNING"));
         EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(exprs);
 
         try {