14 lines
386 B
Python
14 lines
386 B
Python
from waitress import serve
|
|
from app import app, scheduler, db
|
|
from datetime import datetime
|
|
|
|
if __name__ == "__main__":
|
|
with app.app_context():
|
|
db.create_all()
|
|
for job in scheduler.get_jobs():
|
|
job.modify(next_run_time=datetime.now())
|
|
print(job)
|
|
if not scheduler.running:
|
|
scheduler.start()
|
|
serve(app, listen="*:5580", threads=4, ident="")
|