19 lines
358 B
Python
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
|