punchbowl.auto.control.cleaner#

Functions#

cleaner(pipeline_config_path[, session])

delete_old_flow_runs(logger, config[, batch_size])

Delete completed flow runs older than specified days.

reset_revivable_flows(logger, session, pipeline_config)

cancel_running_prefect_flows_before_cutoff(cutoff[, ...])

Cancels flows that started running before a cutoff time.

fail_stuck_flows(logger, session, pipeline_config, state)

Module Contents#

async punchbowl.auto.control.cleaner.cleaner(pipeline_config_path: str, session=None)#
async punchbowl.auto.control.cleaner.delete_old_flow_runs(logger, config, batch_size=100)#

Delete completed flow runs older than specified days.

punchbowl.auto.control.cleaner.reset_revivable_flows(logger, session, pipeline_config)#
async punchbowl.auto.control.cleaner.cancel_running_prefect_flows_before_cutoff(cutoff: datetime.datetime, batch_size: int = 100)#

Cancels flows that started running before a cutoff time.

async punchbowl.auto.control.cleaner.fail_stuck_flows(logger, session, pipeline_config, state, update_prefect=False)#