hagai
08/11/2024, 12:39 PMMarvin
08/11/2024, 12:40 PMtimeout_seconds
attribute in the @flow
decorator. Here's an example:
python
from prefect import flow, task
@task
def say_hello():
print("Hello, World!")
@flow(timeout_seconds=600) # 10 minutes timeout
def my_flow():
say_hello()
my_flow()
For setting this as an environment variable, there's no out-of-the-box solution in Prefect 2.0. You would need to manage timeouts within your code explicitly.
For more on this, you can refer to the official documentation and specific sections related to flows and tasks.
If you require further assistance or a different solution, you can explore Prefect's GitHub issues.