From d623c855e7760a601916810c8df2dda0993e47ee Mon Sep 17 00:00:00 2001 From: MeBeBruno <95308782+MeBeBruno@users.noreply.github.com> Date: Sun, 9 Aug 2026 16:35:22 +0200 Subject: [PATCH] Update application.py --- application.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/application.py b/application.py index 5d031d0..dafe69d 100644 --- a/application.py +++ b/application.py @@ -13,7 +13,7 @@ from passlib.hash import argon2 import pyotp import qrcode import qrcode.image.svg -from apscheduler.schedulers.background import BackgroundScheduler +from apscheduler.schedulers.gevent import GeventScheduler from apscheduler.triggers.cron import CronTrigger from apscheduler.triggers.date import DateTrigger from flask import Flask, request, session, redirect, render_template, url_for, abort, send_from_directory @@ -23,7 +23,7 @@ application = Flask(__name__) app = application # Fallback-Alias für Gunicorn und Pella application.secret_key = secrets.token_hex(64) websocket_manager = SocketIO(application, manage_session=False, async_mode='gevent') -scheduler_instance = BackgroundScheduler(timezone="Europe/Berlin") +scheduler_instance = GeventScheduler(timezone="Europe/Berlin") european_timezone = zoneinfo.ZoneInfo("Europe/Berlin") IDENTIFIER_LENGTH = 5 @@ -366,6 +366,11 @@ def scheduled_action_wrapper(action_type, form_data): def serve_service_worker(): return send_from_directory(application.static_folder, "service_worker.js") +@application.route("/health") +@application.route("/ping") +def handle_health_check(): + return "OK", 200 + @application.route("/") @require_player_authentication def handle_index():