swh.lister.gitlab: Remove TODO about the 403 response code

Multiple issues wish for the api to converge on 429 but nothing is
clear nor documented yet:
- https://gitlab.com/gitlab-com/infrastructure/issues/348
- https://gitlab.com/gitlab-org/gitlab-ce/issues/41309
- https://gitlab.com/gitlab-org/gitlab-ce/issues/46522

The only response code mentioned in the documentation is
403 (https://docs.gitlab.com/ee/api/README.html#status-codes).
This commit is contained in:
Antoine R. Dumont (@ardumont) 2018-07-04 12:27:36 +02:00
parent 1fd44207eb
commit 79cd00737f
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8

View file

@ -91,8 +91,6 @@ class GitLabLister(SWHPagingHttpLister):
"""
reqs_remaining = int(response.headers['RateLimit-Remaining'])
# TODO: need to dig further about the actual returned code
# (not seen yet in documentation)
if response.status_code == 403 and reqs_remaining == 0:
reset_at = int(response.headers['RateLimit-Reset'])
delay = min(reset_at - time.time(), 3600)