Hi all. I was wondering, is this a correct way to ...
# ask-community
k
Hi all. I was wondering, is this a correct way to set task defaults for an entire flow?
Copy code
from prefect.configuration import config

config.tasks.defaults.max_retries = 2
config.tasks.defaults.retry_delay = datetime.timedelta(seconds=10)
k
Hi @Kamil Okáč! This looks right but I think the retry_delay can just be a number instead of the timedelta.
k
Thanks for confirmation. I tried using number of seconds directly, but it doesn't work (it works for loaded configurations (from env or toml files) only).
k
Oh I see. Then yes you are right