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)