Skip to content

Commit

Permalink
feat: catch all exceptions on builder to fail properly
Browse files Browse the repository at this point in the history
Signed-off-by: SdgJlbl <[email protected]>
  • Loading branch information
SdgJlbl committed May 23, 2024
1 parent be4e904 commit 88b4a9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions backend/builder/tasks/tasks_build_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion backend/substrapp/tasks/tasks_compute_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 88b4a9a

Please sign in to comment.