From 113bdce58bc2535978b1c4e56fd67d1d08971b26 Mon Sep 17 00:00:00 2001 From: Jonas Maison Date: Wed, 4 Oct 2023 10:12:12 +0200 Subject: [PATCH] fix: retry when data connections query fails --- src/kili/core/graphql/graphql_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kili/core/graphql/graphql_client.py b/src/kili/core/graphql/graphql_client.py index 45e3897f6..b066fa463 100644 --- a/src/kili/core/graphql/graphql_client.py +++ b/src/kili/core/graphql/graphql_client.py @@ -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 @@ -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),