Skip to content

Commit 4aeb1c9

Browse files
add log
1 parent 3896794 commit 4aeb1c9

File tree

1 file changed

+8
-3
lines changed
  • services/storage/src/simcore_service_storage/modules/celery

1 file changed

+8
-3
lines changed

services/storage/src/simcore_service_storage/modules/celery/client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from common_library.async_tools import make_async
99
from models_library.progress_bar import ProgressReport
1010
from pydantic import ValidationError
11+
from servicelib.logging_utils import log_context
1112

1213
from .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:

0 commit comments

Comments
 (0)