run removal jobs every second
This commit is contained in:
parent
5e749cb3a4
commit
98231879cf
2
app.py
2
app.py
@ -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')
|
||||||
|
Loading…
Reference in New Issue
Block a user