Update application.py
This commit is contained in:
1 parent
dfe64a064e
commit
d623c855e7
1 file changed
+7
-2
+7
-2
@@ -13,7 +13,7 @@ from passlib.hash import argon2
|
|||||||
import pyotp
|
import pyotp
|
||||||
import qrcode
|
import qrcode
|
||||||
import qrcode.image.svg
|
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.cron import CronTrigger
|
||||||
from apscheduler.triggers.date import DateTrigger
|
from apscheduler.triggers.date import DateTrigger
|
||||||
from flask import Flask, request, session, redirect, render_template, url_for, abort, send_from_directory
|
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
|
app = application # Fallback-Alias für Gunicorn und Pella
|
||||||
application.secret_key = secrets.token_hex(64)
|
application.secret_key = secrets.token_hex(64)
|
||||||
websocket_manager = SocketIO(application, manage_session=False, async_mode='gevent')
|
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")
|
european_timezone = zoneinfo.ZoneInfo("Europe/Berlin")
|
||||||
|
|
||||||
IDENTIFIER_LENGTH = 5
|
IDENTIFIER_LENGTH = 5
|
||||||
@@ -366,6 +366,11 @@ def scheduled_action_wrapper(action_type, form_data):
|
|||||||
def serve_service_worker():
|
def serve_service_worker():
|
||||||
return send_from_directory(application.static_folder, "service_worker.js")
|
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("/")
|
@application.route("/")
|
||||||
@require_player_authentication
|
@require_player_authentication
|
||||||
def handle_index():
|
def handle_index():
|
||||||
|
|||||||
Reference in new issue
Block a user