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

exception is not retried #52

Open
chanansh opened this issue Mar 2, 2022 · 0 comments
Open

exception is not retried #52

chanansh opened this issue Mar 2, 2022 · 0 comments

Comments

@chanansh
Copy link

chanansh commented Mar 2, 2022

class RateLimitExceed(Exception):
    """API reate limit exceed"""
    pass

class Api:
    @retry(RateLimitExceed, tries=-1, delay=0.1, logger=logger)
    def _api(self, query):
           message = api_call()
           if message == 'too fast':
                 raise(RateLimitExceed)

although the retry wrapper exists the code break with the exception when called.

The calls are done using joblib.Parallel.

could not reproduce with a minimal example (which works)

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