only calculate delay if enabled
This commit is contained in:
@@ -309,6 +309,7 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
|
|||||||
flags_text = ""
|
flags_text = ""
|
||||||
# delay on error
|
# delay on error
|
||||||
if status >= 400:
|
if status >= 400:
|
||||||
|
if self._delay_on_error > 0:
|
||||||
random_delay = self._delay_on_error * (1 + random.random())
|
random_delay = self._delay_on_error * (1 + random.random())
|
||||||
if status >= 500:
|
if status >= 500:
|
||||||
random_delay = 2 * random_delay
|
random_delay = 2 * random_delay
|
||||||
|
|||||||
Reference in New Issue
Block a user