use of org.apache.sling.event.impl.jobs.config.JobManagerConfiguration in project sling by apache.
the class QueueManager method restart.
/**
* Outdate all queues.
*/
private void restart() {
// let's rename/close all queues and clear them
synchronized (queuesLock) {
final List<JobQueueImpl> queues = new ArrayList<>(this.queues.values());
for (final JobQueueImpl queue : queues) {
this.outdateQueue(queue);
}
}
// check if we're still active
final JobManagerConfiguration config = this.configuration;
if (config != null) {
final List<Job> rescheduleList = this.configuration.clearJobRetryList();
for (final Job j : rescheduleList) {
final JobHandler jh = new JobHandler((JobImpl) j, null, this.configuration);
jh.reschedule();
}
}
}
Aggregations