Gintas
04/03/2026, 2:32 PMresult = await client.set_flow_run_state(
flow_run_id,
Cancelled(message=f"Requested by completion hook of task '{task.name}'"),
force=True,
)
I tried doing sys.exit(1) after cancelling, didn't help.
I tried os.exit(1), it works, but it's suitable only for 1 item to processes, not for multiple items.alex
04/06/2026, 2:11 AMCancelling. That will engage the cancellation mechanics for the flow run and should cause it to shut down.