xqute.plugin
Hook specifications for scheduler plugins
on_init
(
xqute
)
— When xqute is initialized</>on_job_failed
(
scheduler
,job
)
— When the job is failed</>on_job_init
(
scheduler
,job
)
— When the job is initialized</>on_job_killed
(
scheduler
,job
)
— When the job is killed</>on_job_killing
(
scheduler
,job
)
— When the job is being killed</>on_job_polling
(
scheduler
,job
)
— When the system is polling job status</>on_job_queued
(
scheduler
,job
)
— When the job is queued</>on_job_started
(
scheduler
,job
)
— When the job starts to run.</>on_job_submitted
(
scheduler
,job
)
— When the job is submitted</>on_job_submitting
(
scheduler
,job
)
— When the job is to be submitted</>on_job_succeeded
(
scheduler
,job
)
— When the job is succeeded</>on_shutdown
(
xqute
,sig
)
— When xqute is shutting down</>
xqute.plugin.
on_init
(
xqute
)
When xqute is initialized
Note that this hook will run at the same time when producer and consumer start. So they are not ensured to be started at this point.
xqute
(Xqute) — The xqute object
xqute.plugin.
on_shutdown
(
xqute
, sig
)
When xqute is shutting down
Return False to stop shutting down, but you have to shut it down
by yourself, for example, xqute.task.cancel()
Only the first return value will be used.
xqute
(Xqute) — The xqute objectsig
(signal.signals | none) — The signal.None
means a natural shutdown
xqute.plugin.
on_job_init
(
scheduler
, job
)
When the job is initialized
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_queued
(
scheduler
, job
)
When the job is queued
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_submitting
(
scheduler
, job
)
When the job is to be submitted
Return False to cancel submitting. Only the first return value is used.
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_submitted
(
scheduler
, job
)
When the job is submitted
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_started
(
scheduler
, job
)
When the job starts to run.
Note that this is not when exactly the job starts to run, but when the scheduler starts to wait for the job to finish. So this hook is not suitable for measuring the time of the job.
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_polling
(
scheduler
, job
)
When the system is polling job status
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_killing
(
scheduler
, job
)
When the job is being killed
Return False to stop killing the job.
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_killed
(
scheduler
, job
)
When the job is killed
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_failed
(
scheduler
, job
)
When the job is failed
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object
xqute.plugin.
on_job_succeeded
(
scheduler
, job
)
When the job is succeeded
scheduler
(Scheduler) — The scheduler objectjob
(Job) — The job object