run removal jobs every second

This commit is contained in:
Alexandru 2024-09-13 22:05:04 +03:00
parent 5e749cb3a4
commit 98231879cf

2
app.py
View File

@ -31,7 +31,7 @@ def removal():
print(f"[{int(time.time())}]: DELETED #{id}") print(f"[{int(time.time())}]: DELETED #{id}")
sched = BackgroundScheduler(daemon=True) sched = BackgroundScheduler(daemon=True)
sched.add_job(removal,'interval',seconds=5) sched.add_job(removal,'interval',seconds=1)
sched.start() sched.start()
@app.template_filter('expirein') @app.template_filter('expirein')