"Feature: Add calendar and guest status templates"
This commit is contained in:
@@ -1146,6 +1146,7 @@ def kiosk_restart_system():
|
||||
|
||||
# ===== HILFSFUNKTIONEN =====
|
||||
|
||||
@measure_execution_time(logger=printers_logger, task_name="Drucker-Status-Prüfung")
|
||||
def check_printer_status(ip_address: str, timeout: int = 7) -> Tuple[str, bool]:
|
||||
"""
|
||||
Überprüft den Status eines Druckers über Steckdosenabfrage mit Timeout.
|
||||
@@ -1250,6 +1251,7 @@ def check_printer_status(ip_address: str, timeout: int = 7) -> Tuple[str, bool]:
|
||||
printers_logger.error(f"Fehler beim Status-Check für Drucker {ip_address}: {str(e)}")
|
||||
return "offline", False
|
||||
|
||||
@measure_execution_time(logger=printers_logger, task_name="Mehrere-Drucker-Status-Prüfung")
|
||||
def check_multiple_printers_status(printers: List[Dict], timeout: int = 7) -> Dict[int, Tuple[str, bool]]:
|
||||
"""
|
||||
Überprüft den Status mehrerer Drucker parallel mit Timeout.
|
||||
@@ -1678,6 +1680,7 @@ def get_active_jobs():
|
||||
|
||||
@app.route('/api/jobs', methods=['POST'])
|
||||
@login_required
|
||||
@measure_execution_time(logger=jobs_logger, task_name="API-Job-Erstellung")
|
||||
def create_job():
|
||||
"""
|
||||
Erstellt einen neuen Job mit dem Status "scheduled".
|
||||
@@ -1941,6 +1944,7 @@ def get_printers():
|
||||
|
||||
@app.route("/api/printers/status", methods=["GET"])
|
||||
@login_required
|
||||
@measure_execution_time(logger=printers_logger, task_name="API-Drucker-Status-Abfrage")
|
||||
def get_printers_with_status():
|
||||
"""Gibt alle Drucker MIT aktuellem Status-Check zurück - für Aktualisierung."""
|
||||
db_session = get_db_session()
|
||||
@@ -3493,6 +3497,7 @@ def get_online_printers():
|
||||
|
||||
@app.route("/api/printers/status/live", methods=["GET"])
|
||||
@login_required
|
||||
@measure_execution_time(logger=printers_logger, task_name="API-Live-Drucker-Status")
|
||||
def get_live_printer_status():
|
||||
"""Gibt Live-Status aller Drucker zurück mit Session-Caching und Echtzeit-Updates."""
|
||||
db_session = get_db_session()
|
||||
|
Reference in New Issue
Block a user