From 00456e512ac92499fbad3c4b949352522a3d0a04 Mon Sep 17 00:00:00 2001 From: zqc <835569504@qq.com> Date: Sat, 28 Feb 2026 12:11:26 +0800 Subject: [PATCH] =?UTF-8?q?prison=5Fbiz.py=E5=A2=9E=E5=8A=A0=E9=80=9A?= =?UTF-8?q?=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- biz/prison/prison_biz.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/biz/prison/prison_biz.py b/biz/prison/prison_biz.py index 1f79375..4c01b8f 100644 --- a/biz/prison/prison_biz.py +++ b/biz/prison/prison_biz.py @@ -429,19 +429,18 @@ class FrameProcessorWorker(threading.Thread): } try: self.ws_queue.put(msg, timeout=1.0) - # # if action_names and len(action_names) > 0: - # if push_actions and len(push_actions) > 0: - # # 发送POST请求 - # post_msg = msg.copy() - # post_msg['type'] = 2 - # try: - # response = requests.post(ALERT_PUSH_URL, json=post_msg, timeout=5.0) - # if response.status_code == 200: - # print(f"[INFO] POST alert sent successfully for actions: {push_actions}") - # else: - # print(f"[WARN] POST alert failed with status: {response.status_code}") - # except Exception as e: - # print(f"[ERROR] POST alert request failed: {e}") + if push_actions and len(push_actions) > 0: + # 发送POST请求 + post_msg = msg.copy() + post_msg['type'] = 2 + try: + response = requests.post(ALERT_PUSH_URL, json=post_msg, timeout=5.0) + if response.status_code == 200: + print(f"[INFO] POST alert sent successfully for actions: {push_actions}") + else: + print(f"[WARN] POST alert failed with status: {response.status_code}") + except Exception as e: + print(f"[ERROR] POST alert request failed: {e}") except queue.Full: print("[WARN] ws_send_queue full, drop frame message")