from app import db
from flask import Flask
from .corpus_utils import check_corpora
from .job_utils import check_jobs


def daemon(app: Flask):
    with app.app_context():
        check_corpora()
        check_jobs()
        db.session.commit()
