From 6ab873702de01e4665fbb83cbb9eb674b5070283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 19 Feb 2023 20:58:01 +0100 Subject: [PATCH] Clear tasks when transaction is rollback The tasks records are removed on rollback so there is no need to try to run them. (grafted from d2e0256f3478213d5c1ab375bc842c1222157692) --HG-- branch : 6.0 --- trytond/trytond/protocols/dispatcher.py | 1 + 1 file changed, 1 insertion(+) diff --git a/trytond/trytond/protocols/dispatcher.py b/trytond/trytond/protocols/dispatcher.py index a5f184b38c..faded211be 100644 --- a/trytond/trytond/protocols/dispatcher.py +++ b/trytond/trytond/protocols/dispatcher.py @@ -189,6 +189,7 @@ def _dispatch(request, pool, *args, **kwargs): except backend.DatabaseOperationalError: if count and not rpc.readonly: transaction.rollback() + transaction.tasks.clear() continue logger.error(log_message, *log_args, exc_info=True) raise