Skip to content

Commit 61b75ce

Browse files
committed
use user_message
1 parent 14041cd commit 61b75ce

File tree

1 file changed

+10
-3
lines changed
  • services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler

1 file changed

+10
-3
lines changed

services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_base.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import arrow
2323
import networkx as nx
24+
from common_library.user_messages import user_message
2425
from models_library.projects import ProjectID
2526
from models_library.projects_nodes_io import NodeID, NodeIDStr
2627
from models_library.projects_state import RunningState
@@ -247,7 +248,9 @@ async def _set_run_result(
247248
self.rabbitmq_client,
248249
user_id=user_id,
249250
project_id=project_id,
250-
log=f"Pipeline run {run_result.value} for iteration {iteration} is done with {run_result.value} state",
251+
log=user_message(
252+
f"Pipeline run {run_result.value} for iteration {iteration} is done with {run_result.value} state"
253+
),
251254
log_level=logging.INFO,
252255
)
253256
await publish_pipeline_scheduling_state(
@@ -861,7 +864,9 @@ async def _schedule_tasks_to_start(
861864
self.rabbitmq_client,
862865
user_id,
863866
project_id,
864-
log="Unexpected error while scheduling computational tasks! TIP: contact osparc support if this does not resolve automatically.",
867+
log=user_message(
868+
"Unexpected error while scheduling computational tasks! TIP: contact osparc support if this does not resolve automatically."
869+
),
865870
log_level=logging.ERROR,
866871
)
867872
await CompTasksRepository.instance(
@@ -997,7 +1002,9 @@ async def _timeout_if_waiting_for_cluster_too_long(
9971002
)
9981003
for task in tasks_waiting_for_cluster:
9991004
task.state = RunningState.FAILED
1000-
msg = "Timed-out waiting for computational cluster! Please try again and/or contact Osparc support."
1005+
msg = user_message(
1006+
"Timed-out waiting for computational cluster! Please try again and/or contact Osparc support."
1007+
)
10011008
_logger.error(msg)
10021009
await publish_project_log(
10031010
self.rabbitmq_client,

0 commit comments

Comments
 (0)