<@ULVA73B9P> Does the task decorator parameter `ti...
# ask-marvin
t
@Marvin Does the task decorator parameter
timeout_seconds
control the maximum time allowed for the task across all retries or for a single attempt?
m
thought for 111.0 seconds
timeout_seconds
applies to a single attempt. If a task times out and has retries configured, the retry starts with a fresh timeout window. It is not a cumulative limit across all attempts. So for example:
Copy code
python
@task(timeout_seconds=30, retries=2)
def my_task():
    ...
This allows up to 3 attempts total, and each attempt can run for up to 30 seconds. I verified this against Prefect 3.x source/tests: - The task engine wraps execution in a timeout context for each run attempt - There is also a test specifically confirming that the timeout deadline resets on retry If helpful, I can also show what state transitions look like when a timeout triggers a retry.