From 79a307a7b567f0e28eab4e13e3d69b76fa6572c3 Mon Sep 17 00:00:00 2001 From: dymik739 Date: Tue, 10 Oct 2023 00:15:21 +0300 Subject: [PATCH] core: add control option to check the message queue length --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 57f8bd6..6748635 100644 --- a/main.py +++ b/main.py @@ -271,6 +271,11 @@ def queue_processor(): print(f"[INFO]: DELAY_AFTER_IDLE = {DELAY_AFTER_IDLE}") updater.bot.send_message(msg.chat.id, f"[INFO]: DELAY_AFTER_IDLE = {DELAY_AFTER_IDLE}") + elif len(command) == 2 and command[0] == "queue": + if command[1] == "size": + print(f"[INFO]: Queue length is {len(message_queue)}") + updater.bot.send_message(msg.chat.id, f"[INFO]: Queue length is {len(message_queue)}") + continue # modules are used in here