Fix new services implementation 9
This commit is contained in:
@@ -32,10 +32,6 @@ async def lifespan(app: FastAPI):
|
||||
await init_db()
|
||||
logger.info("Database initialized successfully")
|
||||
|
||||
# Setup metrics
|
||||
setup_metrics_early(app, "suppliers-service")
|
||||
logger.info("Metrics setup completed")
|
||||
|
||||
yield
|
||||
|
||||
except Exception as e:
|
||||
@@ -72,6 +68,12 @@ app.add_middleware(
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# Setup metrics
|
||||
try:
|
||||
setup_metrics_early(app, "suppliers-service")
|
||||
logger.info("Metrics setup completed")
|
||||
except Exception as e:
|
||||
logger.error("Metrics setup failed", error=str(e))
|
||||
|
||||
# Setup authentication middleware (commented out - not implemented)
|
||||
# setup_auth_middleware(app)
|
||||
|
||||
Reference in New Issue
Block a user