From 79cd00737f8031e91cfba295db43f16349a4dd0a Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" Date: Wed, 4 Jul 2018 12:27:36 +0200 Subject: [PATCH] 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). --- swh/lister/gitlab/lister.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/swh/lister/gitlab/lister.py b/swh/lister/gitlab/lister.py index 1c0248b..cfd4eee 100644 --- a/swh/lister/gitlab/lister.py +++ b/swh/lister/gitlab/lister.py @@ -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)