Skip to content

Commit 00e529a

Browse files
rbell517Richard Bell
andauthored
fix: Add 429 retries to notebook client (#109)
Co-authored-by: Richard Bell <[email protected]>
1 parent 4a965b4 commit 00e529a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nisystemlink/clients/notebook/_notebook_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
)
1616
from nisystemlink.clients.core.helpers._iterator_file_like import IteratorFileLike
1717
from requests.models import Response
18-
from uplink import Part, Path
18+
from uplink import Part, Path, retry
1919

2020
from . import models
2121

@@ -36,6 +36,7 @@ def _simple_response_handler(response: Response) -> dict:
3636
return response.json()
3737

3838

39+
@retry(when=retry.when.status(429), stop=retry.stop.after_attempt(5))
3940
class NotebookClient(BaseClient):
4041
def __init__(self, configuration: Optional[core.HttpConfiguration] = None):
4142
"""Initialize an instance.

0 commit comments

Comments
 (0)