summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorPetr Špaček <pspacek@isc.org>2022-10-18 14:13:20 +0200
committerNejc Habjan <hab.nejc@gmail.com>2022-12-19 22:58:03 +0100
commitdced76a9900c626c9f0b90b85a5e371101a24fb4 (patch)
tree9af498aa58c5125daddc2d905c2e8963c0b2e760 /gitlab
parent043de2d265e0e5114d1cd901f82869c003413d9b (diff)
downloadgitlab-dced76a9900c626c9f0b90b85a5e371101a24fb4.tar.gz
feat(client): automatically retry on HTTP 409 Resource lock
Fixes: #2325
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/client.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gitlab/client.py b/gitlab/client.py
index f558291..f9462ba 100644
--- a/gitlab/client.py
+++ b/gitlab/client.py
@@ -752,7 +752,10 @@ class Gitlab:
return result.response
if (429 == result.status_code and obey_rate_limit) or (
- result.status_code in gitlab.const.RETRYABLE_TRANSIENT_ERROR_CODES
+ (
+ result.status_code in gitlab.const.RETRYABLE_TRANSIENT_ERROR_CODES
+ or (result.status_code == 409 and "Resource lock" in result.reason)
+ )
and retry_transient_errors
):
# Response headers documentation: