Package overit.geocall.scheduler
Class TimedJobsStartup
java.lang.Object
overit.geocall.scheduler.TimedJobsStartup
- All Implemented Interfaces:
Runnable
A scheduled task responsible for initializing and enqueueing jobs for all active companies.
This class implements Runnable and is designed to be executed periodically by a
ScheduledExecutorService. It checks for companies that have registered their jobs
and attempts to start any jobs that haven't been enqueued yet.
The main responsibilities of this class are:
- Retrieving all active companies from the database
- Checking if all companies have registered their jobs
- Starting jobs for companies that haven't been processed yet
- Tracking which companies have had all their jobs successfully enqueued
- Shutting down the executor service when all jobs are enqueued or after too many attempts
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTimedJobsStartup(ScheduledExecutorService executorService, JobsUtility jobsUtility, ExecutorServiceUtils executorServiceUtils) -
Method Summary
-
Constructor Details
-
TimedJobsStartup
public TimedJobsStartup(ScheduledExecutorService executorService, JobsUtility jobsUtility, ExecutorServiceUtils executorServiceUtils)
-
-
Method Details