You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ibm_appconfiguration/configurations/configuration_handler.py
+16-6Lines changed: 16 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,14 @@
32
32
from .internal.utils.url_builderimportURLBuilder
33
33
from .internal.utils.connectivityimportConnectivity
34
34
from .internal.utils.api_managerimportAPIManager
35
+
importsys
36
+
fromtimeimportsleep
37
+
38
+
# Server max time out is assumed to be 1 week = 604800 seconds = 40320*15
39
+
sys.setrecursionlimit(40320)
40
+
41
+
# delay between each web socket connection retry
42
+
delay=15
35
43
36
44
37
45
classConfigurationHandler:
@@ -62,7 +70,7 @@ def __init__(self):
62
70
self.__segment_map=dict()
63
71
self.__live_config_update_enabled=True
64
72
ConfigurationHandler.__instance=self
65
-
self.__retry_interval=600
73
+
self.__retry_interval=120
66
74
self.__bootstrap_file=None
67
75
self.__persistent_cache_dir=None
68
76
self.__persistent_data=None
@@ -510,15 +518,15 @@ def __fetch_from_api(self):
510
518
Logger.error(f'error while while fetching {exception}')
511
519
else:
512
520
Logger.error(response.get_result())
513
-
ifstatus_codeisNone:
521
+
ifstatus_codeisNoneorstatus_code==499:
514
522
"""
515
523
status_code will be None in-case of
516
524
517
525
1. request was retried for [429, 500, 502, 503, 504] status codes which has exceeded the retry count and has raised the exception "requests.exceptions.RetryError".
0 commit comments