You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2016/01/04 11:08:34 UTC

svn commit: r1722820 - /ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/job/JobManager.java

Author: nmalin
Date: Mon Jan  4 10:08:33 2016
New Revision: 1722820

URL: http://svn.apache.org/viewvc?rev=1722820&view=rev
Log:
Backport from trunk. When ofbiz reload crashed jobs when it start, replay only one time the crashed jobs. Remove all temporal information to ensure that the new job don't create any reccurent schedule that duplicate the origin job's configuration, See OFBIZ-6784, thanks Scott to spot the good correction

Modified:
    ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/job/JobManager.java

Modified: ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/job/JobManager.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=1722820&r1=1722819&r2=1722820&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/job/JobManager.java (original)
+++ ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/job/JobManager.java Mon Jan  4 10:08:33 2016
@@ -300,7 +300,7 @@ public final class JobManager {
             Timestamp now = UtilDateTime.nowTimestamp();
             for (GenericValue job : crashed) {
                 try {
-                    Debug.logInfo("Scheduling Job : " + job, module);
+                    if (Debug.infoOn()) Debug.logInfo("Scheduling Job : " + job, module);
                     String pJobId = job.getString("parentJobId");
                     if (pJobId == null) {
                         pJobId = job.getString("jobId");
@@ -312,6 +312,9 @@ public final class JobManager {
                     newJob.set("parentJobId", pJobId);
                     newJob.set("startDateTime", null);
                     newJob.set("runByInstanceId", null);
+                    //don't set a recurrent schedule on the new job, run it just one time
+                    newJob.set("tempExprId", null);
+                    newJob.set("recurrenceInfoId", null);
                     delegator.createSetNextSeqId(newJob);
                     // set the cancel time on the old job to the same as the re-schedule time
                     job.set("statusId", "SERVICE_CRASHED");