feat: 启动时就自动检查下载nltk
This commit is contained in:
@@ -10,6 +10,7 @@ from starlette.staticfiles import StaticFiles
|
||||
from app.middlewares.app_middlewares import add_app_middlewares
|
||||
from app.utils.db_utils import check_database_connection
|
||||
from app.utils.milvus_utils import milvus_service
|
||||
from app.utils.nltk_utils import check_nltk
|
||||
from app.utils.postgres_checkpointer import check_postgres_connection, close_postgres_connection
|
||||
from app.utils.redis_utils import redis_utils
|
||||
|
||||
@@ -23,6 +24,7 @@ def create_app():
|
||||
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_nltk()),
|
||||
)
|
||||
async_engine = async_results[0]
|
||||
yield
|
||||
|
||||
Reference in New Issue
Block a user