|
21 | 21 | from servicelib.logging_utils import log_catch, log_context |
22 | 22 | from servicelib.rabbitmq import RabbitMQClient |
23 | 23 | from servicelib.utils import limited_gather, logged_gather |
| 24 | +from simcore_sdk.node_ports_common.exceptions import ProjectNotFoundError |
24 | 25 |
|
25 | 26 | from ..projects import _nodes_service, _projects_service |
26 | 27 | from ..rabbitmq import get_rabbitmq_client |
@@ -93,12 +94,21 @@ async def _computational_pipeline_status_message_parser( |
93 | 94 | app: web.Application, data: bytes |
94 | 95 | ) -> bool: |
95 | 96 | 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 | + |
102 | 112 | if rabbit_message.run_result in RUNNING_STATE_COMPLETED_STATES: |
103 | 113 | # the pipeline finished, the frontend needs to update all computational nodes |
104 | 114 | computational_node_ids = ( |
|
0 commit comments