Fix new services implementation 7
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user