mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-09-23 18:00:32 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user