update: 暂时取消redis持久化定时任务
This commit is contained in:
1 parent
5cf16bf03b
commit
e64c4b0839
1 file changed
+1
-1
+1
-1
@@ -34,7 +34,7 @@ logger.info("数据库初始化完成")
|
|||||||
|
|
||||||
#--------------------设置定时任务-----------------------
|
#--------------------设置定时任务-----------------------
|
||||||
scheduler = AsyncIOScheduler()
|
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
|
@asynccontextmanager
|
||||||
async def lifespan(app:FastAPI):
|
async def lifespan(app:FastAPI):
|
||||||
scheduler.start() #启动定时任务
|
scheduler.start() #启动定时任务
|
||||||
|
|||||||
Reference in new issue
Block a user