hi, if I wanted a task to loop or retry by raising...
# prefect-community
s
hi, if I wanted a task to loop or retry by raising a signal, how would I delay the next iteration of the retry? I’m basically create a task that polls something and I’d might want to check that every 10 minutes or so. Previously, I had a for loop/sleep in the task but I figured this signalling would be a better way?
k
Hi @Stephen Herron, time.sleep works or you can use the
max_retries
and
retry_delay
s
yes I think i’m missing something though if say the task decorator has
max_retries
and
retry_delay
specified.. and you raise the
RETRY
signal inside the task, should it not respect the settings in the decorator? might be confusing context/purpose
k
If it doesn’t you can
raise FAIL
too.
s
that works