Update application.py

This commit is contained in:
MeBeBruno authored and GitHub committed 2026-08-09 16:35:22 +02:00
1 parent dfe64a064e
commit d623c855e7
1 file changed
+7 -2
+7 -2
View File
@@ -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():