Skip to content

Commit

Permalink
fix: retry when data connections query fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas1312 committed Oct 4, 2023
1 parent cb303d3 commit 113bdce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/kili/core/graphql/graphql_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from kili.utils.logcontext import LogContext

gql_requests_logger.setLevel(logging.WARNING)

# _limiter and _execute_lock must be kept at module-level
# they need to be shared between all instances of Kili client within the same process

Expand Down Expand Up @@ -286,6 +287,7 @@ def execute(
match=r'.*Field "(\w+)" is not defined by type "(\w+)".*'
),
retry_if_exception_message(match=r".*Invalid request made to Flagsmith API.*"),
retry_if_exception_message(match=r".*Failed to fetch data connection.*"),
),
stop=stop_after_delay(3 * 60),
wait=wait_exponential(multiplier=0.5, min=1, max=10),
Expand Down

0 comments on commit 113bdce

Please sign in to comment.