diff --git a/run_waitress.py b/run_waitress.py index cd1c85e..9ff0b01 100644 --- a/run_waitress.py +++ b/run_waitress.py @@ -1,10 +1,7 @@ from waitress import serve from app import app, scheduler -@app.before_first_request -def start_scheduler(): +if __name__ == "__main__": if not scheduler.running: scheduler.start() - -if __name__ == "__main__": - serve(app, listen="*:5580", threads=4, ident="") + serve(app, listen="*:5580", threads=4, ident="") \ No newline at end of file