Files
material-api/web/tasks/crond/scheduler.py
2024-05-29 10:21:31 +08:00

19 lines
358 B
Python

# -*- coding: utf-8 -*-
"""
定时任务入口
"""
from core.factory import ClientApp
from worker import ASYNC_MODE, MODE_GEVENT
from tasks.crond import sched
app = ClientApp()
if __name__ == '__main__':
try:
g = sched.start()
if ASYNC_MODE == MODE_GEVENT:
g.join()
except (KeyboardInterrupt, SystemExit):
pass