avikganguly01 commented on a change in pull request #459: FINERACT-429: Node
aware Scheduler
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 schedule 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 GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services