From 369086df76f58b716ed71b2dea1299117454c315 Mon Sep 17 00:00:00 2001 From: bvn13 Date: Sat, 28 Dec 2024 00:55:46 +0300 Subject: [PATCH] Update src/main.py --- src/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index e8cd135..aea827b 100644 --- a/src/main.py +++ b/src/main.py @@ -17,6 +17,7 @@ delta = dt.timedelta(hours=3) tz_msk = dt.timezone(offset=delta, name="MSK") if __name__ == "__main__": + logger.info("Starting") session_file = os.environ['SESSION_FILE'] app_id = int(os.environ['TG_APP_ID']) api_hash = os.environ['TG_APP_HASH'] @@ -31,6 +32,7 @@ if __name__ == "__main__": owner_id=owner_id) def start_bot(): + logger.info("Starting bot") asyncio.set_event_loop(asyncio.new_event_loop()) loop = asyncio.get_event_loop() # Your asyncio code here @@ -63,7 +65,6 @@ if __name__ == "__main__": schedule.exec_jobs() time.sleep(1) - thread = threading.Thread(target=start_bot) thread.start() thread2 = threading.Thread(target=scheduled)