only calculate delay if enabled

This commit is contained in:
Peter Bieringer
2026-03-07 16:22:08 +01:00
parent f027647f96
commit 9432e0aeb7

View File

@@ -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