betty.job.scheduler package¶
Submodules¶
Module contents¶
Job scheduling.
- final exception betty.job.scheduler.CyclicDependencyError¶
Bases:
CancelledRaised when a scheduler has cancelled due to a cyclic dependency.
- final exception betty.job.scheduler.DuplicateJobError¶
Bases:
CancelledRaised when a scheduler cannot add the same job (ID) more than once.
- class betty.job.scheduler.Scheduler¶
Bases:
ABCA job scheduler.
- abstractmethod async cancel(reason: BaseException | None = None, /) None¶
Close the scheduler and cancel any pending jobs.
- abstractmethod async complete() None¶
Close the scheduler and wait for any pending jobs to complete.
- abstractmethod async get() ScheduledJobBatch¶
Get a batch of jobs to execute.
- abstractmethod async release() None¶
Release the scheduler.
Once called, jobs are released by
betty.job.scheduler.Scheduler.get(), and new jobs with dependents can no longer be added.