Open Pierre-Alexandre35 opened 3 years ago
@Pierre-Alexandre35 , In the example you have, you would keep retrying without a delay and then stop after 900 seconds. I think you want to wait for 900 seconds after a failure, so try something like this:
@retry(wait=wait_fixed(900))
def get_cards_report(self):
...
This will retry after 900 seconds for any exception. If you only want to retry when the raised exception ("Twitter Rate Limit exceeded") occurs, you can use the retry_if_exception_message
with a match type as an argument to the retry
decorator.
I am trying to avoid a RateLimit Exception on my function and what I a trying to achieve is:
This is my current code but I am still getting the Exception at the same time exact moment as before, so there is no waiting period. Do you have any idea how can I fix it?