From: Michael Tremer Date: Tue, 26 Nov 2024 16:45:27 +0000 (+0000) Subject: backend: Wrap all tasks into a transaction X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cbd9f617f8a0fe69d2d9cc989d51de67a199466;p=ipfire.org.git backend: Wrap all tasks into a transaction Signed-off-by: Michael Tremer --- diff --git a/src/backend/base.py b/src/backend/base.py index 59275910..c7b4fd02 100644 --- a/src/backend/base.py +++ b/src/backend/base.py @@ -185,7 +185,8 @@ class Backend(object): return # Run the task - r = await func(*args, **kwargs) + with self.db.transaction(): + r = await func(*args, **kwargs) # If any error code has been returned, # we will end the program