diff --git a/backend/builder/tasks/tasks_build_image.py b/backend/builder/tasks/tasks_build_image.py index d335fe1c4..0e8bb791a 100644 --- a/backend/builder/tasks/tasks_build_image.py +++ b/backend/builder/tasks/tasks_build_image.py @@ -40,4 +40,8 @@ def build_image(task: BuildTask, function_serialized: str, channel_name: str) -> raise CeleryNoRetryError from e else: continue + except Exception as exception: + logger.exception(exception) + raise CeleryNoRetryError from exception + break diff --git a/backend/substrapp/tasks/tasks_compute_task.py b/backend/substrapp/tasks/tasks_compute_task.py index d559b9ffe..fa522c74a 100644 --- a/backend/substrapp/tasks/tasks_compute_task.py +++ b/backend/substrapp/tasks/tasks_compute_task.py @@ -129,7 +129,7 @@ def compute_task(self: ComputeTask, channel_name: str, serialized_task: str, com raise except Exception as exception: logger.exception(exception) - raise compute_task_errors.CeleryRetryError() from exception + raise compute_task_errors.CeleryRetryError from exception def _send_profiling_event(*, channel_name: str, url_create: str, url_update: str, data: dict[str, Any]) -> bytes: