We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Add option to automatically use a backoff when you've hit a rate limit.
Intermittent failures due to rate limiting.
Re-running the script.
I've hit 429s on this this project: https://github.com/iloveitaly/todoist-scheduler/commits/master
The text was updated successfully, but these errors were encountered:
Ran into this again, would be great if this was built in.
Sorry, something went wrong.
Here's how I did it:
# backoff 5xx errors def patch_todoist_api(): import todoist_api_python.http_requests import backoff import requests patch_targets = ["delete", "get", "json", "post"] for target in patch_targets: original_function = getattr(todoist_api_python.http_requests, target) setattr( todoist_api_python.http_requests, f"original_{target}", original_function, ) patched_function = backoff.on_exception( backoff.expo, requests.exceptions.HTTPError )(original_function) setattr( todoist_api_python.http_requests, target, patched_function, )
No branches or pull requests
Enhancement description
Add option to automatically use a backoff when you've hit a rate limit.
The problem it solves
Intermittent failures due to rate limiting.
Alternatives
Re-running the script.
Use case / screenshots
I've hit 429s on this this project: https://github.com/iloveitaly/todoist-scheduler/commits/master
Additional information
The text was updated successfully, but these errors were encountered: