From 5c878de0277670db559a624b7debb86b65b61d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Tue, 4 Mar 2025 11:20:33 +0100 Subject: [PATCH] fix waitress --- run_waitress.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/run_waitress.py b/run_waitress.py index 222502f..cd1c85e 100644 --- a/run_waitress.py +++ b/run_waitress.py @@ -1,5 +1,10 @@ from waitress import serve -from app import app +from app import app, scheduler + +@app.before_first_request +def start_scheduler(): + if not scheduler.running: + scheduler.start() if __name__ == "__main__": - serve(app, listen='*:5580', threads=4, ident="") + serve(app, listen="*:5580", threads=4, ident="")