You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2021/02/25 05:09:55 UTC

[GitHub] [fineract] avikganguly01 commented on a change in pull request #459: FINERACT-429: Node aware Scheduler

avikganguly01 commented on a change in pull request #459:
URL: https://github.com/apache/fineract/pull/459#discussion_r197642913



##########
File path: fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
##########
@@ -409,4 +416,16 @@ public void postDividends() throws JobExecutionException {
         if (errorMsg.length() > 0) { throw new JobExecutionException(errorMsg.toString()); }
     }
 
+    
+    //get all dirty jobs
+    // execute each job.
+    @Override
+    @CronTarget(jobName = JobName.EXECUTE_DIRTY_JOBS)
+    public void executeDirtyJobs() throws JobExecutionException {
+        List<ScheduledJobDetail> jobDetails=this.scheduledJobDetailsRepository.findAllDirtyJobs(true);
+        for (ScheduledJobDetail scheduledJobDetail:jobDetails){
+            jobRegisterService.executeJob(scheduledJobDetail.getId());

Review comment:
       It should execute only if that job node id and system node id matches. It should not execute.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org