fix
This commit is contained in:
parent
6bcb13479e
commit
4f6762d49a
@ -50,12 +50,12 @@ if __name__ == "__main__":
|
||||
|
||||
def scheduled():
|
||||
schedule = None
|
||||
if os.environ['TEST'] == 1:
|
||||
if 'TEST' in os.environ:
|
||||
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)
|
||||
schedule.daily(dt.time(hour=9, minute=0, tzinfo=tz_msk), shkolniy_weather_job)
|
||||
logger.info(schedule)
|
||||
while True:
|
||||
schedule.exec_jobs()
|
||||
|
Loading…
Reference in New Issue
Block a user