https://prefect.io logo
b

Brad

04/23/2020, 11:04 PM
Hi team - is there any concept of a task timeout in prefect currently ?
👀 1
d

Dylan

04/23/2020, 11:05 PM
You can pass a
timeout
parameter to your task decorator
b

Brad

04/23/2020, 11:06 PM
I’m trying to do some html requests through a proxy server, and ocassionally they get stuck. Ideally I’d just like to wrap my task with
timeout=30
and
retry=5
d

Dylan

04/23/2020, 11:06 PM
That will work! 😄
b

Brad

04/23/2020, 11:07 PM
That was easy.
😂 3
d

Dylan

04/23/2020, 11:07 PM
That second parameter would be
retry_delay
and I believe it accepts a
timedelta
One moment
yes, that’s it
and you can specify a number of attempts to retry with
max_retries
Glad I could help!
b

Brad

04/23/2020, 11:08 PM
Thank you very much @Dylan !
😄 1