Quantum v3.0.0-rc.1 Quantum.Storage behaviour View Source
Bahaviour to be implemented by all Storage Adapters.
Link to this section Summary
Callbacks
Save new job in storage.
Delete new job in storage.
Load saved jobs from storage.
Load last execution time from storage.
Purge all date from storage and go back to initial state.
Change Job State from given job.
Update last execution time to given date.
Link to this section Callbacks
add_job(scheduler_module, job)
View Sourceadd_job(scheduler_module :: Quantum.t(), job :: Quantum.Job.t()) :: :ok
Save new job in storage.
delete_job(scheduler_module, job)
View Sourcedelete_job(scheduler_module :: Quantum.t(), job :: Quantum.Job.name()) :: :ok
Delete new job in storage.
jobs(scheduler_module)
View Sourcejobs(scheduler_module :: Quantum.t()) :: :not_applicable | [Quantum.Job.t()]
Load saved jobs from storage.
Returns :not_applicable
if the storage has never received an add_job
call or after it has been purged.
In this case the jobs from the configuration will be loaded.
last_execution_date(scheduler_module)
View Sourcelast_execution_date(scheduler_module :: Quantum.t()) :: :unknown | NaiveDateTime.t()
Load last execution time from storage.
Returns :unknown
if the storage does not know the last execution time.
In this case all jobs will be run at the next applicable date.
purge(scheduler_module)
View Sourcepurge(scheduler_module :: Quantum.t()) :: :ok
Purge all date from storage and go back to initial state.
update_job_state(scheduler_module, job, state)
View Sourceupdate_job_state( scheduler_module :: Quantum.t(), job :: Quantum.Job.name(), state :: Quantum.Job.state() ) :: :ok
Change Job State from given job.
update_last_execution_date(scheduler_module, last_execution_date)
View Sourceupdate_last_execution_date( scheduler_module :: Quantum.t(), last_execution_date :: NaiveDateTime.t() ) :: :ok
Update last execution time to given date.