File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
services/api-server/src/simcore_service_api_server Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 3333from models_library .users import UserID
3434from servicelib .celery .models import TaskMetadata , TasksQueue , TaskUUID
3535from servicelib .celery .task_manager import TaskManager
36+ from servicelib .logging_errors import create_troubleshootting_log_kwargs
3637from simcore_service_api_server .models .schemas .functions import (
3738 FunctionJobCreationTaskStatus ,
3839)
@@ -87,7 +88,15 @@ async def _celery_task_status(
8788 task_uuid = TaskUUID (job_creation_task_id ), task_filter = task_filter
8889 )
8990 return FunctionJobCreationTaskStatus [task_status .task_state ]
90- except TaskNotFoundError as e :
91+ except TaskNotFoundError as err :
92+ user_msg = f"Job creation task not found for task_uuid={ TaskUUID (job_creation_task_id )} "
93+ _logger .exception (
94+ ** create_troubleshootting_log_kwargs (
95+ user_msg ,
96+ error = err ,
97+ tip = "This probably means the celery task failed, because the task should have created the project_id." ,
98+ )
99+ )
91100 return FunctionJobCreationTaskStatus .ERROR
92101
93102
Original file line number Diff line number Diff line change 55from pydantic import BaseModel , ConfigDict , Field
66from servicelib .celery .models import TaskState
77
8- RUN_JOB_TASK_STATUS_PREFIX : Final [str ] = "RUN_JOB_TASK_STATUS_ "
8+ RUN_JOB_TASK_STATUS_PREFIX : Final [str ] = "JOB_TASK_RUN_STATUS_ "
99
1010
1111class FunctionJobsListFilters (BaseModel ):
@@ -43,10 +43,8 @@ class FunctionJobCreationTaskStatus(StrEnum):
4343 RETRY = f"{ RUN_JOB_TASK_STATUS_PREFIX } RETRY"
4444 SUCCESS = f"{ RUN_JOB_TASK_STATUS_PREFIX } SUCCESS"
4545 FAILURE = f"{ RUN_JOB_TASK_STATUS_PREFIX } FAILURE"
46- NOT_YET_SCHEDULED = (
47- "Function job creation task not yet scheduled" # api-server custom status
48- )
49- ERROR = "Function job creation failed" # api-server custom status
46+ NOT_YET_SCHEDULED = "JOB_TASK_NOT_YET_SCHEDULED" # api-server custom status
47+ ERROR = "JOB_TASK_CREATION_FAILED" # api-server custom status
5048
5149
5250assert {elm ._name_ for elm in TaskState }.union ({"NOT_YET_SCHEDULED" , "ERROR" }) == {
You can’t perform that action at this time.
0 commit comments