Skip to content

feat: obey the rate limit #488

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

Merged
merged 3 commits into from
Apr 24, 2018
Merged

Conversation

max-wittig
Copy link
Member

This PR enables python-gitlab to wait if the GitLab rate-limit is hit.
It waits as long as GitLab specifies via the Retry-After header

GitLab lacks documentation about this feature, but rate-limits can be set in the Admin UI (see screenshot)
and via the settings API.
image

{
 "throttle_authenticated_api_enabled": false,
 "throttle_authenticated_api_requests_per_period": 2,
 "throttle_authenticated_api_period_in_seconds": 10,
}

It can be disabled using the obey_rate_limit=False parameter

@gpocentek
Copy link
Contributor

Hi @max-wittig

Thanks for this PR, it looks good and provides a very nice feature!

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

Successfully merging this pull request may close these issues.

2 participants