Skip to content

feat: obey the rate limit - #488

Merged
gpocentek merged 3 commits into
python-gitlab:masterfrom
siemens:feat/rate-limit
Apr 24, 2018
Merged

feat: obey the rate limit#488
gpocentek merged 3 commits into
python-gitlab:masterfrom
siemens:feat/rate-limit

Conversation

@max-wittig

Copy link
Copy Markdown
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
Copy Markdown
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