BLasan commented on a change in pull request #1886:
URL: https://github.com/apache/fineract/pull/1886#discussion_r725432018



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java
##########
@@ -236,7 +249,14 @@ public void startScheduler() {
     @Override
     public void rescheduleJob(final Long jobId) {
         final ScheduledJobDetail scheduledJobDetail = 
this.schedularWritePlatformService.findByJobId(jobId);
-        rescheduleJob(scheduledJobDetail);
+        final String nodeIdStored = scheduledJobDetail.getNodeId().toString();
+        final String nodeIdEnv = System.getProperty(nodeKey);
+        if (nodeIdStored.equals(nodeIdEnv) || nodeIdStored.equals("0")) {
+            rescheduleJob(scheduledJobDetail);
+        } else {
+            scheduledJobDetail.setIsDirtyJob(true);
+            throw new JobNodeIdMismatchingException(nodeIdStored, nodeIdEnv);

Review comment:
       This exception handling is also not needed since we are marking the jobs 
as "Dirty" (or whatever an appropriate variable)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to