Skip to content

Commit 4c7cb46

Browse files
committed
ensure queue is not ignored
1 parent 961c173 commit 4c7cb46

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def _progress_message_parser(app: web.Application, data: bytes) -> bool:
9393
app,
9494
rabbit_message.user_id,
9595
message=message,
96-
ignore_queue=True,
96+
ignore_queue=False,
9797
)
9898
return True
9999

@@ -107,7 +107,7 @@ async def _log_message_parser(app: web.Application, data: bytes) -> bool:
107107
event_type=SOCKET_IO_LOG_EVENT,
108108
data=rabbit_message.model_dump(exclude={"user_id", "channel_name"}),
109109
),
110-
ignore_queue=True,
110+
ignore_queue=False,
111111
)
112112
return True
113113

@@ -124,7 +124,7 @@ async def _events_message_parser(app: web.Application, data: bytes) -> bool:
124124
"node_id": f"{rabbit_message.node_id}",
125125
},
126126
),
127-
ignore_queue=True,
127+
ignore_queue=False,
128128
)
129129
return True
130130

@@ -178,9 +178,10 @@ async def _osparc_credits_message_parser(app: web.Application, data: bytes) -> b
178178

179179

180180
async def _unsubscribe_from_rabbitmq(app) -> None:
181-
with log_context(
182-
_logger, logging.INFO, msg="Unsubscribing from rabbitmq channels"
183-
), log_catch(_logger, reraise=False):
181+
with (
182+
log_context(_logger, logging.INFO, msg="Unsubscribing from rabbitmq channels"),
183+
log_catch(_logger, reraise=False),
184+
):
184185
rabbit_client: RabbitMQClient = get_rabbitmq_client(app)
185186
await logged_gather(
186187
*(

services/web/server/src/simcore_service_webserver/payments/_socketio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async def notify_payment_completed(
2929
event_type=SOCKET_IO_PAYMENT_COMPLETED_EVENT,
3030
data=jsonable_encoder(payment, by_alias=True),
3131
),
32-
ignore_queue=True,
32+
ignore_queue=False,
3333
)
3434

3535

@@ -46,5 +46,5 @@ async def notify_payment_method_acked(
4646
event_type=SOCKET_IO_PAYMENT_METHOD_ACKED_EVENT,
4747
data=jsonable_encoder(payment_method_transaction, by_alias=True),
4848
),
49-
ignore_queue=True,
49+
ignore_queue=False,
5050
)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,7 @@ async def notify_project_state_update(
19611961
app,
19621962
user_id=notify_only_user,
19631963
message=message,
1964-
ignore_queue=True,
1964+
ignore_queue=False,
19651965
)
19661966
else:
19671967
rooms_to_notify: Generator[GroupID, None, None] = (

services/web/server/src/simcore_service_webserver/socketio/messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ async def send_message_to_user(
6262
user_id: UserID,
6363
message: SocketMessageDict,
6464
*,
65-
ignore_queue: bool,
65+
ignore_queue: bool = False,
6666
) -> None:
6767
"""
6868
Keyword Arguments:
69-
ignore_queue -- set to False when this message is delivered from a server that has no direct connection to the client (default: {True})
70-
An example where this is value is False, is sending messages to a user in the GC
69+
ignore_queue -- set to True when this message is delivered from a server that has no direct connection to the user client (default: {False})
70+
Be careful with this option, as it can lead to message loss if the user is not connected to this server!!
7171
"""
7272
sio: AsyncServer = get_socket_server(app)
7373

0 commit comments

Comments
 (0)