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