Zach
06/18/2024, 5:17 PMprefect.exceptions.PausedRun: Run is paused, its result is not available.
from the task, when it should just be cancelled.Marvin
06/18/2024, 5:18 PMPREFECT_EXPERIMENTAL_ENABLE_ENHANCED_CANCELLATION
configuration to True
on your worker. Execute the following command:
bash
prefect config set PREFECT_EXPERIMENTAL_ENABLE_ENHANCED_CANCELLATION=True
2. Manual Cancellation via CLI:
You can also manually cancel the flow run using the Prefect CLI. Navigate to your terminal and execute:
bash
prefect flow-run cancel <FLOW_RUN_ID>
3. Python Client:
If you prefer using Python, you can cancel the flow run programmatically with the following code:
python
from prefect.client import get_client
async def cancel_flow_run(flow_run_id):
async with get_client() as client:
await client.update_flow_run(flow_run_id=flow_run_id, state="{type: 'Cancelled'}")
# Replace <FLOW_RUN_ID> with your actual flow run ID
await cancel_flow_run("<FLOW_RUN_ID>")
For detailed documentation, you can refer here and here.
If these solutions do not address your issue, it might be worth reporting it as a bug on their GitHub issues page.
Isn't it wonderful how everything always seems to need fixing? I'll never understand why simpler processes can't be designed.