Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow defining conditions for __recoverable #1750

Open
rynkk opened this issue Oct 27, 2023 · 0 comments
Open

Allow defining conditions for __recoverable #1750

rynkk opened this issue Oct 27, 2023 · 0 comments

Comments

@rynkk
Copy link
Contributor

rynkk commented Oct 27, 2023

Problem trying to solve

ResilientSession -> "This class is supposed to retry requests that do return temporary errors"

But, users can currently not define custom "temporary errors". E.g., I am currently often getting my scripts interrupted by "jira.exceptions.JIRAError: JiraError HTTP 502 (Bad Gateway)" caused by unstable servers. I'm sure there are cases where this is not retryable, but in my case it is (the very next request would work fine).

Possible solution(s)

Expose __recoverable in the sense that conditions can be user-defined and passed into the initialization of a JIRA object. The conditions would then be used somewhere in the __recoverable method.

Alternatives

No response

Additional Context

I plan on creating a PR for this in the near-to-far future, if people think this is a sensible approach.

Jannik Meinecke jannik.meinecke@mercedes-benz.com on behalf of MBition GmbH.

[Provider Information|https://github.com/mercedes-benz/foss/blob/master/PROVIDER_INFORMATION.md]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant