diff options
author | Karun Japhet <karun@japhet.in> | 2021-08-28 11:41:59 +0530 |
---|---|---|
committer | Karun Japhet <karun@japhet.in> | 2021-08-29 15:01:18 +0530 |
commit | 3b1d3a41da7e7228f3a465d06902db8af564153e (patch) | |
tree | e16d5e53efb182475c96a32ac1f2686a43ee9c19 /docs/api-usage.rst | |
parent | a00ec87bdbadccaf3e3700a48cbb797fd2750107 (diff) | |
download | gitlab-3b1d3a41da7e7228f3a465d06902db8af564153e.tar.gz |
feat: allow global retry_transient_errors setup
`retry_transient_errors` can now be set through the Gitlab instance and global configuration
Documentation for API usage has been updated and missing tests have been added.
Diffstat (limited to 'docs/api-usage.rst')
-rw-r--r-- | docs/api-usage.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst index e911664..2f7166e 100644 --- a/docs/api-usage.rst +++ b/docs/api-usage.rst @@ -391,6 +391,17 @@ default an exception is raised for these errors. gl = gitlab.gitlab(url, token, api_version=4) gl.projects.list(all=True, retry_transient_errors=True) +The default ``retry_transient_errors`` can also be set on the ``Gitlab`` object +and overridden by individual API calls. + +.. code-block:: python + + import gitlab + import requests + gl = gitlab.gitlab(url, token, api_version=4, retry_transient_errors=True) + gl.projects.list(all=True) # retries due to default value + gl.projects.list(all=True, retry_transient_errors=False) # does not retry + Timeout ------- |