https://dagster.io/ logo
#ask-community
Title
# ask-community
o

Oliver

09/05/2022, 4:10 AM
Hey all 🙂 How would I go about getting exponential backoff when raising retry requested exception? is there a way to access the retry count from the context? Thanks!
dagster bot responded by community 1
🤖 1
j

Jon Simpson

09/05/2022, 4:13 AM
https://docs.dagster.io/concepts/ops-jobs-graphs/op-retries#retrypolicy Backoff, including Jitter, max retries are available
o

Oliver

09/05/2022, 4:14 AM
thanks, not under
RetryRequested
though unless I'm reading wrong https://docs.dagster.io/concepts/ops-jobs-graphs/op-retries#retryrequested
j

Jon Simpson

09/05/2022, 4:33 AM
Sorry sunday night, missed the requested aspect. Only looks like you can set the seconds to way when manually doing it
🌈 1
o

Oliver

09/05/2022, 4:35 AM
ah there is a
context.retry_number
🙂
j

Jon Simpson

09/05/2022, 4:36 AM
If that works please let me know
o

Oliver

09/05/2022, 4:51 AM
yup works 🙂 exponential backoff implemented like so
RetryRequested(max_retries=5, seconds_to_wait=2**context.retry_number)
❤️ 1