diff --git a/trytond/trytond/protocols/dispatcher.py b/trytond/trytond/protocols/dispatcher.py index 3fb11efe62..e71374f4d2 100644 --- a/trytond/trytond/protocols/dispatcher.py +++ b/trytond/trytond/protocols/dispatcher.py @@ -201,7 +201,7 @@ def _dispatch(request, pool, *args, **kwargs): transaction_extras = {} while True: if count: - time.sleep(0.02 * (retry - count)) + time.sleep(0.02 * count) with Transaction().start( pool.database_name, user, readonly=rpc.readonly, timeout=rpc.timeout, diff --git a/trytond/trytond/protocols/wrappers.py b/trytond/trytond/protocols/wrappers.py index 85ea999b49..9b5140899b 100644 --- a/trytond/trytond/protocols/wrappers.py +++ b/trytond/trytond/protocols/wrappers.py @@ -246,7 +246,7 @@ def with_transaction(readonly=None, user=0, context=None, timeout=None): transaction_extras = {} while True: if count: - time.sleep(0.02 * (retry - count)) + time.sleep(0.02 * count) with Transaction().start( pool.database_name, user_, readonly=readonly_, context=context_, timeout=timeout, diff --git a/trytond/trytond/worker.py b/trytond/trytond/worker.py index ab85f1427b..57322fed86 100644 --- a/trytond/trytond/worker.py +++ b/trytond/trytond/worker.py @@ -145,7 +145,7 @@ def run_task(pool, task_id): transaction_extras = {} while True: if count: - time.sleep(0.02 * (retry - count)) + time.sleep(0.02 * count) with Transaction().start( pool.database_name, 0, **transaction_extras) as transaction: