Skip to content

Commit 1867e27

Browse files
committed
no need to double catch
1 parent 8950bec commit 1867e27

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/service-library/src/servicelib/rabbitmq/_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def _get_x_death_count(message: aio_pika.abc.AbstractIncomingMessage) -> int:
4646
and isinstance(x_death[0], dict)
4747
and "count" in x_death[0]
4848
):
49-
5049
assert isinstance(x_death[0]["count"], int) # nosec
5150
count = x_death[0]["count"]
5251

@@ -96,7 +95,9 @@ async def _on_message(
9695
if not await message_handler(message.body):
9796
await _safe_nack(message_handler, max_retries_upon_error, message)
9897
except Exception: # pylint: disable=broad-exception-caught
99-
_logger.exception("Exception raised when handling message")
98+
_logger.exception(
99+
"Exception raised when handling message. This is catched and will continue. TIP: review your code"
100+
)
100101
with log_catch(_logger, reraise=False):
101102
await _safe_nack(message_handler, max_retries_upon_error, message)
102103

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@
4444
async def _notify_comp_node_progress(
4545
app: web.Application, message: ProgressRabbitMessageNode
4646
) -> None:
47-
with log_catch(_logger, reraise=False):
48-
project = await _projects_service.get_project_for_user(
49-
app, f"{message.project_id}", message.user_id, include_state=True
50-
)
51-
await _projects_service.notify_project_node_update(
52-
app, project, message.node_id, None
53-
)
47+
project = await _projects_service.get_project_for_user(
48+
app, f"{message.project_id}", message.user_id, include_state=True
49+
)
50+
await _projects_service.notify_project_node_update(
51+
app, project, message.node_id, None
52+
)
5453

5554

5655
async def _progress_message_parser(app: web.Application, data: bytes) -> bool:

0 commit comments

Comments
 (0)