forked from killua/TakwayPlatform
update: 暂时取消redis持久化定时任务
This commit is contained in:
parent
5cf16bf03b
commit
e64c4b0839
|
@ -34,7 +34,7 @@ logger.info("数据库初始化完成")
|
|||
|
||||
#--------------------设置定时任务-----------------------
|
||||
scheduler = AsyncIOScheduler()
|
||||
scheduler.add_job(updating_redis_cache, CronTrigger.from_crontab("0 4 * * *"))
|
||||
# scheduler.add_job(updating_redis_cache, CronTrigger.from_crontab("0 4 * * *"))
|
||||
@asynccontextmanager
|
||||
async def lifespan(app:FastAPI):
|
||||
scheduler.start() #启动定时任务
|
||||
|
|
Loading…
Reference in New Issue