| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 985b971 commit 887852d
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,6 @@ | |||
| 22 | 22 | "{source!r} to {target!r}" | |
| 23 | 23 | ) | |
| 24 | 24 | ||
| 25 | - RETRYABLE_TRANSIENT_ERROR_CODES = [500, 502, 503, 504] + list(range(520, 531)) | ||
| 26 | 25 | ||
| 27 | 26 | # https://docs.gitlab.com/ee/api/#offset-based-pagination | |
| 28 | 27 | _PAGINATION_URL = ( | |
@@ -781,7 +780,7 @@ def http_request( | |||
| 781 | 780 | return result | |
| 782 | 781 | ||
| 783 | 782 | if (429 == result.status_code and obey_rate_limit) or ( | |
| 784 | - result.status_code in RETRYABLE_TRANSIENT_ERROR_CODES | ||
| 783 | + result.status_code in gitlab.const.RETRYABLE_TRANSIENT_ERROR_CODES | ||
| 785 | 784 | and retry_transient_errors | |
| 786 | 785 | ): | |
| 787 | 786 | # Response headers documentation: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -131,6 +131,8 @@ class SearchScope(GitlabEnum): | |||
| 131 | 131 | ||
| 132 | 132 | USER_AGENT: str = f"{__title__}/{__version__}" | |
| 133 | 133 | ||
| 134 | + RETRYABLE_TRANSIENT_ERROR_CODES = [500, 502, 503, 504] + list(range(520, 531)) | ||
| 135 | + | ||
| 134 | 136 | __all__ = [ | |
| 135 | 137 | "AccessLevel", | |
| 136 | 138 | "Visibility", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ | |||
| 6 | 6 | import responses | |
| 7 | 7 | ||
| 8 | 8 | from gitlab import GitlabHttpError, GitlabList, GitlabParsingError, RedirectError | |
| 9 | - from gitlab.client import RETRYABLE_TRANSIENT_ERROR_CODES | ||
| 9 | + from gitlab.const import RETRYABLE_TRANSIENT_ERROR_CODES | ||
| 10 | 10 | from tests.unit import helpers | |
| 11 | 11 | ||
| 12 | 12 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments