File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,13 +38,12 @@ async def listen_monitor():
3838 current_latency = latency
3939 req_info = latest .get ('reqInfo' , '' )
4040 if latency > ALLOWED_LATENCY or '→ 200' not in req_info :
41- alert = f'🚨 ALERT 🚨\n { req_info } \n Latency: { latency :.1f} ms\n @Lunitarik shell i /restart server? '
41+ alert = f'🚨 ALERT 🚨\n { req_info } \n Latency: { latency :.1f} ms\n check statistic at http://sergei-scv.ru:8080/ '
4242 if not failed and not scheduled_fail :
4343 failed = True
4444 bot .send_message (CHAT_ID , alert )
4545 elif failed :
4646 failed = False
47- global scheduled_fail
4847 scheduled_fail = False
4948 alert = f'✅ OK\n { req_info } \n Latency: { latency :.1f} ms'
5049 bot .send_message (CHAT_ID , alert )
@@ -73,7 +72,6 @@ def handle_status(message: telebot.types.Message):
7372
7473@bot .message_handler (commands = ['fail' ])
7574def handle_fail (message : telebot .types .Message ):
76- global scheduled_fail
7775 if str (message .chat .id ) not in [CHAT_ID , DEBUG_CHAT_ID ]:
7876 bot .reply_to (message , "⛔️ Unauthorized" )
7977 return
You can’t perform that action at this time.
0 commit comments