mirror of
https://github.com/ION606/static-site-hosting.git
synced 2026-05-14 22:16:54 +00:00
Split routes into multiple files (#2)
* split into files * attempted path fix * perms fix * added missed functions * fixed circular dependancy * I hate splitting * env fix * path fix
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# app/scheduler.py
|
||||
from flask_apscheduler import APScheduler
|
||||
from .helpers import delete_inactive_sites
|
||||
|
||||
scheduler = APScheduler()
|
||||
|
||||
|
||||
def init_scheduler(app):
|
||||
scheduler.init_app(app)
|
||||
scheduler.start()
|
||||
scheduler.add_job(
|
||||
id="delete_job",
|
||||
func=delete_inactive_sites,
|
||||
trigger="interval",
|
||||
days=1,
|
||||
)
|
||||
Reference in New Issue
Block a user