123456789101112131415161718 |
- # -*- coding: utf-8 -*-
- import os
- from typing import Callable, Optional
- from fastapi import FastAPI
- # from app.controllers.equipment.events import regulate_ahu_freq
- 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()
- if os.getenv("NEED_MILVUS", "yes") == "yes":
- await get_milvus_cli()
- return start_app
|