private static Logger log = LoggerFactory.getLogger(SpringCallerRunsRejectedJobsHandler.class);
public void jobRejected(AsyncExecutor asyncExecutor, JobEntity job) {
try {
// execute rejected work in caller thread (potentially blocking job acquisition)
new ExecuteAsyncRunnable(job, asyncExecutor.getCommandExecutor()).run();
} catch (Exception e) {
log.error("Failed to execute rejected job " + job.getId(), e);
}
}