-
Notifications
You must be signed in to change notification settings - Fork 675
Closed
Labels
Description
Would it be possible to add rate limiting into GitLab._raw_get (https://github.com/gpocentek/python-gitlab/blob/5f444e4ddf1087a8c4081f9b8d8b3d87d36a0985/gitlab/__init__.py), and tie it to a config option in ~/.python-gitlab.cfg?
I keep getting gitlab.exceptions.GitlabListError from HTTP 429 caused by gitlab rate limiting. I expect that I can catch this exception, delay the code, then retry the failed command. There is no nice way though to know the number of underlying API requests made by python-gitlab, so I cannot precisely figure out the delay, nor easily pre-delay to avoid the HTTP 429. I'm using a few ....list(all=True), so even with arbitrary sleeps here and there, I still hit the limit a lot.
FedericoCeratto