question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

retry strategy triggered by any Exception except the ones listed

See original GitHub issue

Hi, thanks for this project guys!

I was wondering if is there a way to create a retry strategy that instead of retrying for some listed exceptions it’d retry for any Exception except the ones listed, so basically it’s the inverse logic currently used.

I was checking the BaseRetryStrategy class but it seems to me that it doesn’t manage the logic for selecting which exceptions should be retried.

Thanks.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ewjoachimcommented, Nov 5, 2021

could this be implemented just subclassing BaseRetryStrategy then?

Yes I think so. Though it make sense to add this to the procrastinate lib, feel free to implement this on your side in the meantime. And/or to contribute to the lib 😃

0reactions
ewjoachimcommented, Nov 5, 2021

See https://docs.python.org/3/library/typing.html#typing.overload to properly indicate with mypy that arguments are mutually exclusive

Read more comments on GitHub >

github_iconTop Results From Across the Web

RetryTemplate for specific exceptions not triggered
I can see the simulated Exception type 1 thrown. But there is no retry happening. Please guide to know where is this failing...
Read more >
Azure Functions error handling and retry guidance
Learn to handle errors and retry events in Azure Functions with links to specific binding errors, including information on retry policies.
Read more >
Error handling in Step Functions - AWS Documentation
When a state has both Retry and Catch fields, Step Functions uses any appropriate retriers first. If the retry policy fails to resolve...
Read more >
Is it possible to handle different exceptions differently with the ...
// don't need to reconnect on a CommandException // but need to reconnect before a retry when an IOException occurs myPolicy = Policy...
Read more >
Retries - DataStax Java Driver
The default policy triggers a maximum of one retry, to the next node in the query plan. The rationale is that the first...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found