cancel
Showing results for 
Search instead for 
Did you mean: 

JobExecutor.waitTimeInMillis being ignored

jsilva
Champ in-the-making
Champ in-the-making
Hello, everyone.

I'm trying to change the default value for the JobExecutor's waitTimeInMillis property, but my jobs are being retried immediately.

I'm using Activiti 5.15.1 and this is the relevant configuration:


<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
    <!– … –>
   
    <property name="jobExecutor">
       <bean id="jobExecutor" class="org.activiti.engine.impl.jobexecutor.DefaultJobExecutor">
          <property name="waitTimeInMillis" value="60000" />
       </bean>
    </property>
  </bean>

I've found that the reason why this happens comes from the code block at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable:68:


if (jobsAcquired < maxJobsPerAcquisition) {
    // …
} else {
    millisToWait = 0;
}

So I have three questions:

1. Could someone please explain to me the reason why someone would want a job to execute immediately when the maximum number of jobs has been acquired?

2. What would you suggest to wait before retrying a job? Somehow overriding a FailedJobCommandFactory?

Thanks for your time.
10 REPLIES 10

vasile_dirla
Star Contributor
Star Contributor
@Sridhar_B,  Activiti 5.12 is really old (more than 2 years), and considering the comment added by @jsilva, maybe migrating to a newer version will help you.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.