添加定时任务配置
This commit is contained in:
7
scheduler/__init__.py
Normal file
7
scheduler/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from fastapi import FastAPI
|
||||
from fastscheduler.fastapi_integration import create_scheduler_routes
|
||||
from scheduler.scheduler import scheduler
|
||||
|
||||
def init_scheduler_router(app : FastAPI):
|
||||
app.include_router(create_scheduler_routes(scheduler))
|
||||
scheduler.start()
|
||||
Reference in New Issue
Block a user