1720
This commit is contained in:
@@ -567,11 +567,17 @@ async def main():
|
||||
if effective_delay_ms > 0:
|
||||
rmq_body["properties"]["headers"] = {"x-delay": int(effective_delay_ms)}
|
||||
|
||||
# ---- SURGICAL FIX (bell must sound during payload_raw line) ----
|
||||
async with print_lock:
|
||||
sys.stdout.write("\a" * 3)
|
||||
sys.stdout.flush()
|
||||
# -------------------------------------------------------------
|
||||
|
||||
await log_status(
|
||||
f"[{ts()}] ok, here i will execute\n"
|
||||
f" url: {rmq_url}\n"
|
||||
f" routing_key: {RMQ_ROUTING_KEY}\n"
|
||||
f" payload_raw: {('\a' * 3)}{payload_raw}\n"
|
||||
f" payload_raw: {payload_raw}\n"
|
||||
f" publish_body: {json.dumps(rmq_body, ensure_ascii=False)}"
|
||||
)
|
||||
|
||||
@@ -613,7 +619,7 @@ async def main():
|
||||
except Exception as e:
|
||||
await log_status(f"[{ts()}] nb: action_last/timestamp patch error host={host!r} dev_id={dev_id!r} err={e!r}")
|
||||
|
||||
bell_prefix = ""
|
||||
bell_prefix = "\a" * 3
|
||||
else:
|
||||
# action_last != action_next -> publish
|
||||
effective_delay_ms = RMQ_DELAY_MS
|
||||
@@ -639,6 +645,12 @@ async def main():
|
||||
if effective_delay_ms > 0:
|
||||
rmq_body["properties"]["headers"] = {"x-delay": int(effective_delay_ms)}
|
||||
|
||||
# ---- SURGICAL FIX (bell must sound during payload_raw line) ----
|
||||
async with print_lock:
|
||||
sys.stdout.write("\a" * 3)
|
||||
sys.stdout.flush()
|
||||
# -------------------------------------------------------------
|
||||
|
||||
await log_status(
|
||||
f"[{ts()}] ok, here i will execute\n"
|
||||
f" url: {rmq_url}\n"
|
||||
@@ -736,4 +748,4 @@ if __name__ == "__main__":
|
||||
try:
|
||||
asyncio.run(main())
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
pass
|
||||
Reference in New Issue
Block a user