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
This commit is contained in:
1 parent
8421b34613
commit
6ab873702d
1 file changed
+1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user