Skip to content

Commit 4c841df

Browse files
committed
fix
1 parent c51028b commit 4c841df

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

latency_bot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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}\nLatency: {latency:.1f} ms\n@Lunitarik shell i /restart server?'
41+
alert = f'🚨 ALERT 🚨\n{req_info}\nLatency: {latency:.1f} ms\ncheck 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}\nLatency: {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'])
7574
def 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

0 commit comments

Comments
 (0)