Skip to content

Commit fdade4f

Browse files
fix
1 parent a93fcbc commit fdade4f

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

services/web/server/src/simcore_service_webserver/notifications/_rabbitmq_exclusive_queue_consumers.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from servicelib.logging_utils import log_catch, log_context
2222
from servicelib.rabbitmq import RabbitMQClient
2323
from servicelib.utils import limited_gather, logged_gather
24+
from simcore_sdk.node_ports_common.exceptions import ProjectNotFoundError
2425

2526
from ..projects import _nodes_service, _projects_service
2627
from ..rabbitmq import get_rabbitmq_client
@@ -93,12 +94,21 @@ async def _computational_pipeline_status_message_parser(
9394
app: web.Application, data: bytes
9495
) -> bool:
9596
rabbit_message = ComputationalPipelineStatusMessage.model_validate_json(data)
96-
project = await _projects_service.get_project_for_user(
97-
app,
98-
f"{rabbit_message.project_id}",
99-
rabbit_message.user_id,
100-
include_state=True,
101-
)
97+
try:
98+
project = await _projects_service.get_project_for_user(
99+
app,
100+
f"{rabbit_message.project_id}",
101+
rabbit_message.user_id,
102+
include_state=True,
103+
)
104+
except ProjectNotFoundError:
105+
_logger.warning(
106+
"Cannot notify user %s about project %s status: project not found",
107+
rabbit_message.user_id,
108+
rabbit_message.project_id,
109+
)
110+
return True # <-- telling RabbitMQ that message was processed
111+
102112
if rabbit_message.run_result in RUNNING_STATE_COMPLETED_STATES:
103113
# the pipeline finished, the frontend needs to update all computational nodes
104114
computational_node_ids = (

0 commit comments

Comments
 (0)