- further healthz improvements

This commit is contained in:
Josako
2025-09-07 14:45:47 +02:00
parent 362b2fe753
commit 575bfa259e
4 changed files with 35 additions and 28 deletions

View File

@@ -88,11 +88,11 @@ def create_app(config_file=None):
# Register standard health endpoints at /healthz (liveness/readiness)
# These must be public and not require authentication.
try:
from flask_healthz import healthz as healthz_blueprint
app.register_blueprint(healthz_blueprint, url_prefix="/healthz")
except Exception as e:
app.logger.warning(f"Failed to register /healthz blueprint: {e}")
# try:
# from flask_healthz import healthz as healthz_blueprint
# app.register_blueprint(healthz_blueprint, url_prefix="/healthz")
# except Exception as e:
# app.logger.warning(f"Failed to register /healthz blueprint: {e}")
# Custom url_for function for templates
@app.context_processor
@@ -130,11 +130,11 @@ def create_app(config_file=None):
app.logger.debug(f"Before request - URL: {request.url}")
app.logger.debug(f"Before request - Session permanent: {session.permanent}")
# Log session expiry tijd als deze bestaat
if current_user.is_authenticated:
# Controleer of sessie permanent is (nodig voor PERMANENT_SESSION_LIFETIME)
if not session.permanent:
session.permanent = True
# # Log session expiry tijd als deze bestaat
# if current_user.is_authenticated:
# # Controleer of sessie permanent is (nodig voor PERMANENT_SESSION_LIFETIME)
# if not session.permanent:
# session.permanent = True
@app.route('/debug/session')
def debug_session():
@@ -201,9 +201,8 @@ def register_blueprints(app):
app.register_blueprint(entitlements_bp)
from .views.partner_views import partner_bp
app.register_blueprint(partner_bp)
from .views.healthz_views import healthz_bp, init_healtz
from .views.healthz_views import healthz_bp
app.register_blueprint(healthz_bp)
init_healtz(app)
def register_cache_handlers(app):