events.py 310 B

1234567891011121314
  1. # -*- coding: utf-8 -*-
  2. import os
  3. from typing import Callable
  4. from app.services.milvus_helpers import get_milvus_cli
  5. def create_start_app_handler() -> Callable:
  6. async def start_app() -> None:
  7. if os.getenv("NEED_MILVUS", "yes") == "yes":
  8. await get_milvus_cli()
  9. return start_app