routeros_update/run_waitress.py
Mateusz Gruszczyński 04c1e6d49a new options
2025-02-24 10:18:52 +01:00

10 lines
294 B
Python

from waitress import serve
from app import app, scheduler, clean_old_logs
import atexit
with app.app_context():
scheduler.add_job(func=clean_old_logs, trigger="interval", days=1)
atexit.register(lambda: scheduler.shutdown())
serve(app, host='0.0.0.0', port=5582, ident='', threads=4)