From 585d290355e8dba66c7933770318c5d058ce9707 Mon Sep 17 00:00:00 2001 From: Florian Kellermann Date: Tue, 26 Apr 2022 09:02:21 +0200 Subject: [PATCH] Some prints --- telegram_bot/bot_updates.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/telegram_bot/bot_updates.py b/telegram_bot/bot_updates.py index 4fa5459..47cefa7 100644 --- a/telegram_bot/bot_updates.py +++ b/telegram_bot/bot_updates.py @@ -46,6 +46,8 @@ def start_updater(): :rtype: none """ + print("Bot updates started") + my_handler = API_Handler("https://gruppe1.testsites.info/api", str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD"))) @@ -75,6 +77,8 @@ def update_crontab(p_my_handler): user_ids.append(int(element["telegram_user_id"])) user_crontab.append(str(element["cron"])) + print(user_ids) + update_based_on_crontab(user_ids, user_crontab, p_my_handler) update_crontab(p_my_handler) @@ -101,6 +105,7 @@ def update_based_on_crontab(p_user_ids, p_user_crontab, p_my_handler): for i in range(len(p_user_ids)): cron_split = p_user_crontab[i].split(" ") + print(cron_split[4], cron_split[1], cron_split[0], cron_split[3], cron_split[2]) my_scheduler.add_job(update_for_user, 'cron', day_of_week = cron_split[4] , hour= cron_split[1] , minute = cron_split[0], month= cron_split[3] , day=cron_split[2], args=(p_user_ids[i], p_my_handler )) my_scheduler.start()