diff options
author | Max Wittig <max.wittig@siemens.com> | 2020-12-22 08:44:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-22 08:44:03 +0100 |
commit | b36048114d80741c2b307a81f2206be3b467b108 (patch) | |
tree | 0bb78478f266d1f9b3ec8716c1cc31c29aa5e260 | |
parent | 265dbbdd37af88395574564aeb3fd0350288a18c (diff) | |
download | gitlab-feat/retry-transient-errors-global.tar.gz |
feat: add retry_transient_errors global optionfeat/retry-transient-errors-global
-rw-r--r-- | gitlab/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 960f086..06d1ff0 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -62,6 +62,7 @@ class Gitlab(object): api_version (str): Gitlab API version to use (support for 4 only) pagination (str): Can be set to 'keyset' to use keyset pagination order_by (str): Set order_by globally + retry_transient_errors (bool): Retry transient errors, defaults to False """ def __init__( @@ -79,6 +80,7 @@ class Gitlab(object): per_page=None, pagination=None, order_by=None, + retry_transient_errors=False, ): self._api_version = str(api_version) @@ -106,6 +108,7 @@ class Gitlab(object): self.per_page = per_page self.pagination = pagination self.order_by = order_by + self.retry_transient_errors = retry_transient_errors objects = importlib.import_module("gitlab.v%s.objects" % self._api_version) self._objects = objects @@ -202,6 +205,7 @@ class Gitlab(object): per_page=config.per_page, pagination=config.pagination, order_by=config.order_by, + retry_transient_errors=retry_transient_errors, ) def auth(self): |