Skip to content

Commit ba7fb36

Browse files
committed
cancel failed tasks
1 parent ac1aa9e commit ba7fb36

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

automation/canfar_polling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ async def _fetch_prefect_completed_flow_runs(limit: int = 200):
111111
async def _fail_flow_run(flow_run_id, reason: str) -> None:
112112
"""Mark the specified flow-run as FAILED with the given reason/message."""
113113
async with get_client() as client:
114+
await client.cancel_flow_run(flow_run_id=flow_run_id)
114115
await client.set_flow_run_state(
115116
flow_run_id=flow_run_id,
116117
state=Failed(message=reason),

0 commit comments

Comments
 (0)