Fix new services implementation 7

This commit is contained in:
Urtzi Alfaro
2025-08-15 22:40:19 +02:00
parent 277b1332cb
commit 399ba80067
15 changed files with 433 additions and 534 deletions

View File

@@ -15,8 +15,8 @@ from app.core.config import settings
from app.core.database import init_db, close_db
from app.api import suppliers, purchase_orders, deliveries
from shared.monitoring.health import router as health_router
from shared.monitoring.metrics import setup_metrics
from shared.auth.decorators import setup_auth_middleware
from shared.monitoring.metrics import setup_metrics_early
# from shared.auth.decorators import setup_auth_middleware
logger = structlog.get_logger()
@@ -33,7 +33,7 @@ async def lifespan(app: FastAPI):
logger.info("Database initialized successfully")
# Setup metrics
setup_metrics(app)
setup_metrics_early(app, "suppliers-service")
logger.info("Metrics setup completed")
yield
@@ -73,8 +73,8 @@ app.add_middleware(
)
# Setup authentication middleware
setup_auth_middleware(app)
# Setup authentication middleware (commented out - not implemented)
# setup_auth_middleware(app)
# Exception handlers