Hi Prefect team
I am trying to handle tasks timout, and was wondering how can I stop/cancel a task if the timout is reached
FYI: I am using Prefect 2.3.1
Here is an exemple of what I want to do
Copy code
Wait N sconds for the task to complete
>>> @flow
>>> def my_flow():
>>> future = my_task()
>>> final_state = future.wait(0.1)
>>> if final_state:
>>> ... # Task done
>>> else:
>>> ... # Task not done yet = > Cancel task
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.