From d8b5b4d4470d75a382b0283731c5fb600ddb1e91 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 22 Sep 2026 08:02:18 -0700 Subject: [PATCH] Chore: Stop the live-service retry helper sleeping after a success (#14222) util_call_with_backoff made every call wait 20 seconds even when the first attempt succeeded The helper now sleeps only after a failure that has another attempt left. --- src/paperless_testing/retry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/paperless_testing/retry.py b/src/paperless_testing/retry.py index 67d1f81a4..7b5f16765 100644 --- a/src/paperless_testing/retry.py +++ b/src/paperless_testing/retry.py @@ -61,8 +61,9 @@ def util_call_with_backoff( retry_count = retry_count + 1 - time.sleep(retry_time) - retry_time = retry_time * 2.0 + if not succeeded and retry_count < max_retry_count: + time.sleep(retry_time) + retry_time = retry_time * 2.0 if ( not succeeded