File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
services/storage/src/simcore_service_storage/modules/celery Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 88from common_library .async_tools import make_async
99from models_library .progress_bar import ProgressReport
1010from pydantic import ValidationError
11+ from servicelib .logging_utils import log_context
1112
1213from .models import TaskContext , TaskID , TaskStatus , TaskUUID
1314
@@ -48,9 +49,13 @@ def send_task(
4849 ) -> TaskUUID :
4950 task_uuid = uuid4 ()
5051 task_id = _build_task_id (task_context , task_uuid )
51- _logger .debug ("Submitting task %s: %s" , task_name , task_id )
52- self ._celery_app .send_task (task_name , task_id = task_id , kwargs = task_params )
53- return task_uuid
52+ with log_context (
53+ _logger ,
54+ logging .DEBUG ,
55+ msg = f"Submitting task { task_name } : { task_id = } { task_params = } " ,
56+ ):
57+ self ._celery_app .send_task (task_name , task_id = task_id , kwargs = task_params )
58+ return task_uuid
5459
5560 @make_async ()
5661 def get_task (self , task_context : TaskContext , task_uuid : TaskUUID ) -> Any :
You can’t perform that action at this time.
0 commit comments