feat: Task 19 — Health-Check Blueprint mit Readiness-Endpunkt (closes #19)

This commit is contained in:
hermes
2026-06-22 11:17:04 +00:00
parent bdae37a4d0
commit f825165596
3 changed files with 123 additions and 5 deletions
+9 -5
View File
@@ -8,6 +8,10 @@ from src.config import settings
from src.error_handler import register_error_handlers
from src.logging_config import setup_logging
from src.queue.handler import QueueHandler
from src.routes.admin import admin_bp
from src.routes.health import health_bp
from src.routes.telegram import telegram_bp
from src.routes.whatsapp import whatsapp_bp
def create_app() -> Flask:
@@ -29,9 +33,9 @@ def create_app() -> Flask:
redis_port=settings.REDIS_PORT,
)
@app.route("/health")
def health() -> dict:
"""Health-Check Endpoint für Monitoring."""
return {"status": "ok", "queue_size": app.queue_handler.queue_size()}
app.register_blueprint(telegram_bp, url_prefix="/webhook")
app.register_blueprint(whatsapp_bp, url_prefix="/webhook")
app.register_blueprint(admin_bp, url_prefix="/admin")
app.register_blueprint(health_bp)
return app
return app