init
This commit is contained in:
18
web/tasks/crond/scheduler.py
Normal file
18
web/tasks/crond/scheduler.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*- 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
|
Reference in New Issue
Block a user