ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nma...@apache.org
Subject svn commit: r1722817 - /ofbiz/branches/release14.12/framework/service/src/org/ofbiz/service/job/JobManager.java
Date Mon, 04 Jan 2016 10:00:04 GMT
Author: nmalin
Date: Mon Jan  4 10:00:04 2016
New Revision: 1722817

URL: http://svn.apache.org/viewvc?rev=1722817&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/release14.12/framework/service/src/org/ofbiz/service/job/JobManager.java

Modified: ofbiz/branches/release14.12/framework/service/src/org/ofbiz/service/job/JobManager.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=1722817&r1=1722816&r2=1722817&view=diff
==============================================================================
--- ofbiz/branches/release14.12/framework/service/src/org/ofbiz/service/job/JobManager.java
(original)
+++ ofbiz/branches/release14.12/framework/service/src/org/ofbiz/service/job/JobManager.java
Mon Jan  4 10:00:04 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");



Mime
View raw message