feat: mysql连接成功
This commit is contained in:
+4
-4
@@ -19,12 +19,12 @@ def create_app():
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
print("lifespan:启动阶段")
|
||||
await check_nltk()
|
||||
# await check_nltk()
|
||||
async_results = await asyncio.gather(
|
||||
asyncio.create_task(check_database_connection()),
|
||||
asyncio.create_task(check_postgres_connection()),
|
||||
asyncio.create_task(milvus_service.check_milvus_connection()),
|
||||
asyncio.create_task(redis_utils.check_redis_connection()),
|
||||
# asyncio.create_task(check_postgres_connection()),
|
||||
# asyncio.create_task(milvus_service.check_milvus_connection()),
|
||||
# asyncio.create_task(redis_utils.check_redis_connection()),
|
||||
)
|
||||
async_engine = async_results[0]
|
||||
yield
|
||||
|
||||
Reference in New Issue
Block a user