Add Dalidou storage foundation and deployment prep
This commit is contained in:
@@ -5,8 +5,9 @@ from fastapi import FastAPI
|
||||
from atocore.api.routes import router
|
||||
import atocore.config as _config
|
||||
from atocore.context.project_state import init_project_state_schema
|
||||
from atocore.ingestion.pipeline import get_source_status
|
||||
from atocore.models.database import init_db
|
||||
from atocore.observability.logger import setup_logging
|
||||
from atocore.observability.logger import get_logger, setup_logging
|
||||
|
||||
app = FastAPI(
|
||||
title="AtoCore",
|
||||
@@ -15,13 +16,22 @@ app = FastAPI(
|
||||
)
|
||||
|
||||
app.include_router(router)
|
||||
log = get_logger("main")
|
||||
|
||||
|
||||
@app.on_event("startup")
|
||||
def startup():
|
||||
setup_logging()
|
||||
_config.ensure_runtime_dirs()
|
||||
init_db()
|
||||
init_project_state_schema()
|
||||
log.info(
|
||||
"startup_ready",
|
||||
env=_config.settings.env,
|
||||
db_path=str(_config.settings.db_path),
|
||||
chroma_path=str(_config.settings.chroma_path),
|
||||
source_status=get_source_status(),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user