@@ -131,7 +131,7 @@ def set_up_component_resiliency_yaml(self, file_name):
131
131
or self .get_argument_in_circuit_breaker_consecutive_errors () or self .get_argument_out_circuit_breaker_consecutive_errors ()
132
132
or self .get_argument_in_circuit_breaker_timeout () or self .get_argument_out_circuit_breaker_timeout ()
133
133
# these arguments accept 0 as value, so we need to distinguish between unassigned and 0
134
- or (self .get_argument_in_circuit_breaker_interval () != None ) or (self .get_argument_out_circuit_breaker_interval () != None )):
134
+ or (self .get_argument_in_circuit_breaker_interval () is not None ) or (self .get_argument_out_circuit_breaker_interval () is not None )):
135
135
not self .get_argument_disable_warnings () and logger .warning (
136
136
'Additional flags were passed along with --yaml. These flags will be ignored, and the configuration '
137
137
'defined in the yaml will be used instead' )
@@ -340,12 +340,12 @@ def construct_payload(self):
340
340
safe_set (self .component_resiliency_patch_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "consecutiveErrors" , value = self .get_argument_in_circuit_breaker_consecutive_errors ())
341
341
elif safe_get (component_resiliency_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "consecutiveErrors" ):
342
342
safe_set (self .component_resiliency_patch_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "consecutiveErrors" , value = safe_get (component_resiliency_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "consecutiveErrors" ))
343
-
343
+
344
344
if self .get_argument_in_circuit_breaker_interval () is not None :
345
345
safe_set (self .component_resiliency_patch_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "intervalInSeconds" , value = self .get_argument_in_circuit_breaker_interval ())
346
346
elif safe_get (component_resiliency_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "intervalInSeconds" ):
347
347
safe_set (self .component_resiliency_patch_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "intervalInSeconds" , value = safe_get (component_resiliency_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "intervalInSeconds" ))
348
-
348
+
349
349
if self .get_argument_in_circuit_breaker_timeout () is not None :
350
350
safe_set (self .component_resiliency_patch_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "timeoutInSeconds" , value = self .get_argument_in_circuit_breaker_timeout ())
351
351
elif safe_get (component_resiliency_def , "properties" , "inboundPolicy" , "circuitBreakerPolicy" , "timeoutInSeconds" ):
@@ -380,12 +380,12 @@ def construct_payload(self):
380
380
safe_set (self .component_resiliency_patch_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "consecutiveErrors" , value = self .get_argument_out_circuit_breaker_consecutive_errors ())
381
381
elif safe_get (component_resiliency_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "consecutiveErrors" ):
382
382
safe_set (self .component_resiliency_patch_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "consecutiveErrors" , value = safe_get (component_resiliency_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "consecutiveErrors" ))
383
-
383
+
384
384
if self .get_argument_out_circuit_breaker_interval () is not None :
385
385
safe_set (self .component_resiliency_patch_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "intervalInSeconds" , value = self .get_argument_out_circuit_breaker_interval ())
386
386
elif safe_get (component_resiliency_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "intervalInSeconds" ):
387
387
safe_set (self .component_resiliency_patch_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "intervalInSeconds" , value = safe_get (component_resiliency_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "intervalInSeconds" ))
388
-
388
+
389
389
if self .get_argument_out_circuit_breaker_timeout () is not None :
390
390
safe_set (self .component_resiliency_patch_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "timeoutInSeconds" , value = self .get_argument_out_circuit_breaker_timeout ())
391
391
elif safe_get (component_resiliency_def , "properties" , "outboundPolicy" , "circuitBreakerPolicy" , "timeoutInSeconds" ):
0 commit comments