From 58c86bbe2d66689be1620599012e8e57ede1110d Mon Sep 17 00:00:00 2001 From: namasikanam Date: Fri, 5 Nov 2021 06:51:03 +0800 Subject: [PATCH] use Flask debug flag --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index ebc1b61..1027263 100644 --- a/app.py +++ b/app.py @@ -114,7 +114,7 @@ def choose_new_next(min_like_num=10): scheduler = BackgroundScheduler() for d in range(5, 15): for m in range(0, 24 * 60, C.period): - scheduler.add_job(func=choose_new_next, trigger='date', run_date=datetime(2021, 11, d, m // 60, m % 60), args=[1] if C.debug else []) + scheduler.add_job(func=choose_new_next, trigger='date', run_date=datetime(2021, 11, d, m // 60, m % 60), args=[1] if app.debug else []) scheduler.start() # Shut down the scheduler when exiting the app