We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3481ab7 + 3ecc462 commit 41593c9Copy full SHA for 41593c9
dlt_source_personio/rest_client.py
@@ -2,6 +2,7 @@
2
import logging
3
4
import dlt
5
+from dlt.sources.helpers.requests.retry import Client
6
from dlt.sources.helpers.rest_client.client import RESTClient, Response
7
from dlt.sources.helpers.rest_client.paginators import JSONLinkPaginator
8
@@ -12,7 +13,11 @@
12
13
from dlt.sources.helpers.requests.session import Session
14
15
# Share a session (and thus pool) between all rest clients
-session: Session = Session(raise_for_status=False)
16
+# Client by default retries on all 5xx errors (including 502, 504) and 429
17
+# with exponential backoff, up to 5 attempts
18
+session: Session = Client(
19
+ raise_for_status=False,
20
+).session
21
22
auth: PersonioOAuth2ClientCredentials = None
23
0 commit comments