diff --git a/concent_api/conductor/tasks.py b/concent_api/conductor/tasks.py index f0f8b5987..451dad2f8 100644 --- a/concent_api/conductor/tasks.py +++ b/concent_api/conductor/tasks.py @@ -1,5 +1,7 @@ import logging from celery import shared_task +from django.db import transaction + from core import tasks from utils.constants import ErrorCode from utils.decorators import log_task_errors @@ -19,6 +21,7 @@ @shared_task @provides_concent_feature('conductor-worker') @log_task_errors +@transaction.atomic(using='storage') def blender_verification_request( subtask_id: str, source_package_path: str, @@ -89,6 +92,7 @@ def blender_verification_request( @shared_task @log_task_errors +@transaction.atomic(using='storage') def upload_acknowledged( subtask_id: str, source_file_size: str, diff --git a/concent_api/core/tasks.py b/concent_api/core/tasks.py index 01cc5d5fb..883bb49e0 100644 --- a/concent_api/core/tasks.py +++ b/concent_api/core/tasks.py @@ -31,6 +31,7 @@ @shared_task @log_task_errors +@transaction.atomic(using='control') def upload_finished(subtask_id: str): try: subtask = Subtask.objects.get(subtask_id=subtask_id)