From 5d19eb0f26f63dbdcd053a45e457fe6dc1d9fdcd Mon Sep 17 00:00:00 2001 From: pavel Date: Wed, 11 Feb 2026 14:50:30 +0200 Subject: [PATCH] 1450 --- files/nats_registration_listener.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/files/nats_registration_listener.py b/files/nats_registration_listener.py index bec7ae2..38889c2 100644 --- a/files/nats_registration_listener.py +++ b/files/nats_registration_listener.py @@ -402,17 +402,18 @@ async def main(): ) # Publish disabled (kept in place, commented out) - # resp, code = http_post_json(rmq_url, rmq_body, user=RMQ_USER, password=RMQ_PASS, timeout=RMQ_TIMEOUT) - # if code != 200: - # await log_status(f"[{ts()}] rmq: publish immediate http={code} host={host}") - # else: - # routed = False - # try: - # routed = bool((resp or {}).get("routed", False)) - # except Exception: - # routed = False - # if not routed: - # await log_status(f"[{ts()}] rmq: publish immediate routed=false host={host}") + resp, code = http_post_json(rmq_url, rmq_body, user=RMQ_USER, password=RMQ_PASS, timeout=RMQ_TIMEOUT) + if code != 200: + await log_status(f"[{ts()}] rmq: publish immediate http={code} host={host}") + else: + routed = False + try: + routed = bool((resp or {}).get("routed", False)) + except Exception: + routed = False + if not routed: + await log_status(f"[{ts()}] rmq: publish immediate routed=false host={host}") + # Bell behavior: ring 3x BEL when action_next present bell_prefix = "\a" * 3