File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/celery-library/src/celery_library Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -26,5 +26,11 @@ def decode_celery_transferrable_error(error: TransferrableCeleryError) -> Except
2626 return result
2727
2828
29+ class TaskSubmissionError (OsparcErrorMixin , Exception ):
30+ msg_template = (
31+ "Unable to submit task {task_name} with id '{task_id}' and params {task_params}"
32+ )
33+
34+
2935class TaskNotFoundError (OsparcErrorMixin , Exception ):
3036 msg_template = "Task with id '{task_id}' was not found"
Original file line number Diff line number Diff line change 2323from servicelib .logging_utils import log_context
2424from settings_library .celery import CelerySettings
2525
26- from .errors import TaskNotFoundError
26+ from .errors import TaskNotFoundError , TaskSubmissionError
2727
2828_logger = logging .getLogger (__name__ )
2929
@@ -87,7 +87,11 @@ async def submit_task(
8787 "Unable to cleanup task '%s' during error handling" ,
8888 task_id ,
8989 )
90- raise
90+ raise TaskSubmissionError (
91+ task_name = task_metadata .name ,
92+ task_id = task_id ,
93+ task_params = task_params ,
94+ ) from exc
9195
9296 return task_uuid
9397
You can’t perform that action at this time.
0 commit comments