routeros_backup/run_waitress.py
2025-02-24 08:42:51 +01:00

10 lines
246 B
Python

from waitress import serve
from app import app, reschedule_jobs, scheduler
import atexit
with app.app_context():
reschedule_jobs()
atexit.register(lambda: scheduler.shutdown())
serve(app, host='0.0.0.0', port=5581, ident='', threads=4)