Make the "daemon" (now tasks) more understandable

This commit is contained in:
Patrick Jentsch
2024-09-26 15:33:32 +02:00
parent aabea234fe
commit 5f05cedf5e
5 changed files with 21 additions and 17 deletions

View File

@ -141,8 +141,11 @@ def create_app(config: Config = Config) -> Flask:
# region Add scheduler jobs
if app.config['NOPAQUE_IS_PRIMARY_INSTANCE']:
from .daemon import daemon
scheduler.add_job('daemon', daemon, args=(app,), seconds=3, trigger='interval')
from .tasks import handle_corpora
scheduler.add_job('handle_corpora', handle_corpora, seconds=3, trigger='interval')
from .tasks import handle_jobs
scheduler.add_job('handle_jobs', handle_jobs, seconds=3, trigger='interval')
# endregion Add scheduler jobs
return app