Skip to content

Commit ca341eb

Browse files
committed
fix variables env
1 parent c2338e2 commit ca341eb

File tree

1 file changed

+38
-39
lines changed

1 file changed

+38
-39
lines changed

source/jormungandr/jormungandr/default_settings.py

+38-39
Original file line numberDiff line numberDiff line change
@@ -155,63 +155,62 @@
155155
ISOCHRONE_DEFAULT_VALUE = os.getenv('JORMUNGANDR_ISOCHRONE_DEFAULT_VALUE', 1800) # in s
156156

157157
# circuit breaker parameters.
158-
CIRCUIT_BREAKER_MAX_INSTANCE_FAIL = 4 # max instance call failures before stopping attempt
159-
CIRCUIT_BREAKER_INSTANCE_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
158+
CIRCUIT_BREAKER_MAX_INSTANCE_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_INSTANCE_FAIL', 4)) # max instance call failures before stopping attempt
159+
CIRCUIT_BREAKER_INSTANCE_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_INSTANCE_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
160160

161-
CIRCUIT_BREAKER_MAX_TIMEO_FAIL = 4 # max instance call failures before stopping attempt
162-
CIRCUIT_BREAKER_TIMEO_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
161+
CIRCUIT_BREAKER_MAX_TIMEO_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_TIMEO_FAIL', 4)) # max instance call failures before stopping attempt
162+
CIRCUIT_BREAKER_TIMEO_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_TIMEO_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
163163

164-
CIRCUIT_BREAKER_MAX_SYNTHESE_FAIL = 4 # max instance call failures before stopping attempt
165-
CIRCUIT_BREAKER_SYNTHESE_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
164+
CIRCUIT_BREAKER_MAX_SYNTHESE_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_SYNTHESE_FAIL', 4)) # max instance call failures before stopping attempt
165+
CIRCUIT_BREAKER_SYNTHESE_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_SYNTHESE_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
166166

167-
CIRCUIT_BREAKER_MAX_JCDECAUX_FAIL = 4 # max instance call failures before stopping attempt
168-
CIRCUIT_BREAKER_JCDECAUX_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
167+
CIRCUIT_BREAKER_MAX_JCDECAUX_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_JCDECAUX_FAIL', 4)) # max instance call failures before stopping attempt
168+
CIRCUIT_BREAKER_JCDECAUX_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_JCDECAUX_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
169169

170-
CIRCUIT_BREAKER_MAX_CAR_PARK_FAIL = 4 # max instance call failures before stopping attempt
171-
CIRCUIT_BREAKER_CAR_PARK_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
170+
CIRCUIT_BREAKER_MAX_CAR_PARK_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_CAR_PARK_FAIL', 4)) # max instance call failures before stopping attempt
171+
CIRCUIT_BREAKER_CAR_PARK_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_CAR_PARK_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
172172

173-
CIRCUIT_BREAKER_MAX_CLEVERAGE_FAIL = 4 # max instance call failures before stopping attempt
174-
CIRCUIT_BREAKER_CLEVERAGE_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
173+
CIRCUIT_BREAKER_MAX_CLEVERAGE_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_CLEVERAGE_FAIL', 4)) # max instance call failures before stopping attempt
174+
CIRCUIT_BREAKER_CLEVERAGE_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_CLEVERAGE_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
175175

176-
CIRCUIT_BREAKER_MAX_SYTRAL_FAIL = 4 # max instance call failures before stopping attempt
177-
CIRCUIT_BREAKER_SYTRAL_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
176+
CIRCUIT_BREAKER_MAX_SYTRAL_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_SYTRAL_FAIL', 4)) # max instance call failures before stopping attempt
177+
CIRCUIT_BREAKER_SYTRAL_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_SYTRAL_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
178178

179-
CIRCUIT_BREAKER_MAX_VALHALLA_FAIL = 4 # max instance call failures before stopping attempt
180-
CIRCUIT_BREAKER_VALHALLA_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
179+
CIRCUIT_BREAKER_MAX_VALHALLA_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_VALHALLA_FAIL', 4)) # max instance call failures before stopping attempt
180+
CIRCUIT_BREAKER_VALHALLA_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_VALHALLA_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
181181

182-
CIRCUIT_BREAKER_MAX_GEOVELO_FAIL = 4 # max instance call failures before stopping attempt
183-
CIRCUIT_BREAKER_GEOVELO_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
182+
CIRCUIT_BREAKER_MAX_GEOVELO_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_GEOVELO_FAIL', 4)) # max instance call failures before stopping attempt
183+
CIRCUIT_BREAKER_GEOVELO_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_GEOVELO_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
184184

185-
CIRCUIT_BREAKER_MAX_HERE_FAIL = 4 # max instance call failures before stopping attempt
186-
CIRCUIT_BREAKER_HERE_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
185+
CIRCUIT_BREAKER_MAX_HERE_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_HERE_FAIL', 4)) # max instance call failures before stopping attempt
186+
CIRCUIT_BREAKER_HERE_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_HERE_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
187187

188-
CIRCUIT_BREAKER_MAX_CYKLEO_FAIL = 4 # max instance call failures before stopping attempt
189-
CIRCUIT_BREAKER_CYKLEO_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
188+
CIRCUIT_BREAKER_MAX_CYKLEO_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_CYKLEO_FAIL', 4)) # max instance call failures before stopping attempt
189+
CIRCUIT_BREAKER_CYKLEO_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_CYKLEO_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
190190

191-
CIRCUIT_BREAKER_MAX_INSTANT_SYSTEM_FAIL = 4 # max instance call failures before stopping attempt
192-
CIRCUIT_BREAKER_INSTANT_SYSTEM_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
191+
CIRCUIT_BREAKER_MAX_INSTANT_SYSTEM_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_INSTANT_SYSTEM_FAIL', 4)) # max instance call failures before stopping attempt
192+
CIRCUIT_BREAKER_INSTANT_SYSTEM_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_INSTANT_SYSTEM_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
193193

194-
CIRCUIT_BREAKER_MAX_BLABLALINES_FAIL = 4 # max instance call failures before stopping attempt
195-
CIRCUIT_BREAKER_BLABLALINES_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
194+
CIRCUIT_BREAKER_MAX_BLABLALINES_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_BLABLALINES_FAIL', 4)) # max instance call failures before stopping attempt
195+
CIRCUIT_BREAKER_BLABLALINES_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_BLABLALINES_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
196196

197-
CIRCUIT_BREAKER_MAX_KAROS_FAIL = 4 # max instance call failures before stopping attempt
198-
CIRCUIT_BREAKER_KAROS_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
197+
CIRCUIT_BREAKER_MAX_KAROS_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_KAROS_FAIL', 4)) # max instance call failures before stopping attempt
198+
CIRCUIT_BREAKER_KAROS_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_KAROS_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
199199

200-
CIRCUIT_BREAKER_MAX_BRAGI_FAIL = 4 # max instance call failures before stopping attempt
201-
CIRCUIT_BREAKER_BRAGI_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
200+
CIRCUIT_BREAKER_MAX_BRAGI_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_BRAGI_FAIL', 4)) # max instance call failures before stopping attempt
201+
CIRCUIT_BREAKER_BRAGI_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_BRAGI_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
202202

203-
CIRCUIT_BREAKER_MAX_ASGARD_FAIL = 4 # max instance call failures before stopping attempt
204-
CIRCUIT_BREAKER_ASGARD_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
203+
CIRCUIT_BREAKER_MAX_ASGARD_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_ASGARD_FAIL', 4)) # max instance call failures before stopping attempt
204+
CIRCUIT_BREAKER_ASGARD_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_ASGARD_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
205205

206-
CIRCUIT_BREAKER_MAX_KLAXIT_FAIL = 4 # max instance call failures before stopping attempt
207-
CIRCUIT_BREAKER_KLAXIT_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
206+
CIRCUIT_BREAKER_MAX_KLAXIT_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_KLAXIT_FAIL', 4)) # max instance call failures before stopping attempt
207+
CIRCUIT_BREAKER_KLAXIT_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_KLAXIT_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
208208

209-
CIRCUIT_BREAKER_MAX_OUESTGO_FAIL = 4 # max instance call failures before stopping attempt
210-
CIRCUIT_BREAKER_OUESTGO_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
211-
212-
CIRCUIT_BREAKER_MAX_FORSETI_FAIL = 4 # max instance call failures before stopping attempt
213-
CIRCUIT_BREAKER_FORSETI_TIMEOUT_S = 60 # the circuit breaker retries after this timeout (in seconds)
209+
CIRCUIT_BREAKER_MAX_OUESTGO_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_OUESTGO_FAIL', 4)) # max instance call failures before stopping attempt
210+
CIRCUIT_BREAKER_OUESTGO_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_OUESTGO_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
214211

212+
CIRCUIT_BREAKER_MAX_FORSETI_FAIL = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_MAX_FORSETI_FAIL', 4)) # max instance call failures before stopping attempt
213+
CIRCUIT_BREAKER_FORSETI_TIMEOUT_S = int(os.getenv('JORMUNGANDR_CIRCUIT_BREAKER_FORSETI_TIMEOUT_S', 60)) # the circuit breaker retries after this timeout (in seconds)
215214

216215
# Default region instance
217216
# DEFAULT_REGION = 'default'

0 commit comments

Comments
 (0)