if(job.getExceptionMessage()==null){// is it the first
// exception
log.debug("Applying JobRetryStrategy '"+failedJobRetryTimeCycle+"' the first time for job "+job.getId()+" with "+durationHelper.getTimes()+" retries");
if(job.getExceptionMessage()==null){// is it the first exception
log.debug("Applying JobRetryStrategy '"+failedJobRetryTimeCycleValue+"' the first time for job "+job.getId()+" with "+durationHelper.getTimes()+" retries");
// then change default retries to the ones configured
job.setRetries(durationHelper.getTimes());
}else{
log.debug("Decrementing retries of JobRetryStrategy '"+failedJobRetryTimeCycle+"' for job "+job.getId());
log.debug("Decrementing retries of JobRetryStrategy '"+failedJobRetryTimeCycleValue+"' for job "+job.getId());
}
job.setRetries(job.getRetries()-1);
}catch(Exceptione){
thrownewActivitiException("failedJobRetryTimeCylcle has wrong format:"+failedJobRetryTimeCycle,exception);
thrownewActivitiException("failedJobRetryTimeCylcle has wrong format:"+failedJobRetryTimeCycleValue,exception);
}
}
...
...
@@ -173,6 +182,9 @@ public class JobRetryCmd implements Command<Object> {
@@ -163,15 +164,7 @@ public class JobQueryTest extends PluggableActivitiTestCase {
}
publicvoidtestQueryByExecutable(){
processEngineConfiguration.getClock().setCurrentTime(newDate(timerThreeFireTime.getTime()+ONE_SECOND));// all
// jobs
// should
// be
// executable
// at
// t3
// +
// 1hour.1second
processEngineConfiguration.getClock().setCurrentTime(newDate(timerThreeFireTime.getTime()+ONE_SECOND));// all obs should be executable at t3 + 1hour.1second