mirror of
https://github.com/flibusta-apps/telegram_files_server.git
synced 2025-12-06 12:35:39 +01:00
Add metrics and healthcheck refactor
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
|
||||
from app.on_start import on_start
|
||||
from app.views import router, healthcheck_router
|
||||
from core.db import database
|
||||
@@ -27,4 +29,6 @@ def start_app() -> FastAPI:
|
||||
if database_.is_connected:
|
||||
await database_.disconnect()
|
||||
|
||||
Instrumentator().instrument(app).expose(app, include_in_schema=True)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user