From 6bcb13479ef1701c6bca4dc8480ec8e6f4459da0 Mon Sep 17 00:00:00 2001 From: bvn13 Date: Fri, 19 Jul 2024 09:18:22 +0300 Subject: [PATCH] upd --- src/main.py | 10 +++++++--- version | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index 156e1c0..8e82450 100644 --- a/src/main.py +++ b/src/main.py @@ -49,9 +49,13 @@ if __name__ == "__main__": bot.send_weather(WeatherTask('shkolniy', "{0}".format(shkolniy_weather))) def scheduled(): - schedule = Scheduler(tzinfo=tz_msk) - # schedule.cyclic(dt.timedelta(seconds=10), shkolniy_weather_job) - schedule.daily(dt.time(hour=9, minute=15, tzinfo=tz_msk), shkolniy_weather_job) + schedule = None + if os.environ['TEST'] == 1: + schedule = Scheduler() + schedule.cyclic(dt.timedelta(seconds=10), shkolniy_weather_job) + else: + Scheduler(tzinfo=tz_msk) + schedule.daily(dt.time(hour=7, minute=0, tzinfo=tz_msk), shkolniy_weather_job) logger.info(schedule) while True: schedule.exec_jobs() diff --git a/version b/version index 72f9fa8..28af839 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.2.4 \ No newline at end of file +0.2.5 \ No newline at end of file