|
@@ -1,5 +1,6 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
+import os
|
|
|
from typing import Callable, Optional
|
|
|
|
|
|
from fastapi import FastAPI
|
|
@@ -11,6 +12,7 @@ from app.services.milvus_helpers import get_milvus_cli
|
|
|
def create_start_app_handler(app: Optional[FastAPI] = None) -> Callable:
|
|
|
async def start_app() -> None:
|
|
|
# await regulate_ahu_freq()
|
|
|
- await get_milvus_cli()
|
|
|
+ if os.getenv("NEED_MILVUS", "yes") == "yes":
|
|
|
+ await get_milvus_cli()
|
|
|
|
|
|
return start_app
|