Skip to content

Commit c93168a

Browse files
committed
fixes test listerner
1 parent 6b0048f commit c93168a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

services/web/server/src/simcore_service_webserver/projects/_projects_service.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,7 @@ async def _trigger_connected_service_retrieve(
14711471

14721472
# find the nodes that need to retrieve data
14731473
for node_uuid, node in workbench.items():
1474+
14741475
# check this node is dynamic
14751476
if not _is_node_dynamic(node["key"]):
14761477
continue
@@ -1482,18 +1483,20 @@ async def _trigger_connected_service_retrieve(
14821483
if not isinstance(port_value, dict):
14831484
continue
14841485

1485-
input_node_uuid = port_value.get("nodeUuid")
1486+
# FIXME: hack to support both field and alias names because cannot guarantee which one is stored in workbench
1487+
input_node_uuid = port_value.get("nodeUuid", port_value.get("node_uuid"))
14861488
if input_node_uuid != updated_node_uuid:
14871489
continue
1490+
14881491
# so this node is linked to the updated one, now check if the port was changed?
14891492
linked_input_port = port_value.get("output")
14901493
if linked_input_port in changed_keys:
14911494
nodes_keys_to_update[node_uuid].append(port_key)
14921495

14931496
# call /retrieve on the nodes
14941497
update_tasks = [
1495-
dynamic_scheduler_service.retrieve_inputs(app, NodeID(node), keys)
1496-
for node, keys in nodes_keys_to_update.items()
1498+
dynamic_scheduler_service.retrieve_inputs(app, NodeID(node_id), keys)
1499+
for node_id, keys in nodes_keys_to_update.items()
14971500
]
14981501
await logged_gather(*update_tasks, reraise=False)
14991502

services/web/server/tests/unit/with_dbs/04/notifications/test_notifications__db_comp_tasks_listening_task.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,11 @@ async def mock_dynamic_service_rpc(
232232
"""
233233
Mocks the dynamic service RPC calls to avoid actual service calls during tests.
234234
"""
235-
return mocker.patch(
236-
"servicelib.rabbitmq.rpc_interfaces.dynamic_scheduler.services.retrieve_inputs",
235+
import servicelib.rabbitmq.rpc_interfaces.dynamic_scheduler.services
236+
237+
return mocker.patch.object(
238+
servicelib.rabbitmq.rpc_interfaces.dynamic_scheduler.services,
239+
"retrieve_inputs",
237240
autospec=True,
238241
)
239242

0 commit comments

Comments
 (0)