flowbber.scheduler
¶Pipeline scheduler.
Scheduler
:
Schedule the execution of a pipeline.flowbber.scheduler.
Scheduler
(pipeline, frequency, samples=None, start=None, stop_on_failure=False)¶Schedule the execution of a pipeline.
The scheduler will try to run the pipeline on schedule. If the pipeline
takes too long, longer that the programmed frequency, the scheduler will
increment the runs_missed
counter for each execution that failed to
run at the expected schedule because the previous run was still running and
will start the missed pipeline execution right away.
flowbber.pipeline.Pipeline
.) – The pipeline to execute.None
, the scheduler will continue taking samples
forever.None
, the scheduler will start immediately.Inheritance
last_run
¶Timestamp in seconds since the epoch of the last run of the pipeline.
run
()¶Start the scheduler.
runs
¶Read-only dictionary with the numbers of categorized runs of the pipeline:
{
'passed': 10,
'failed': 2,
'missed': 0,
}