"Refactor error handling and rate limiting in FEHLER_BEHOBEN module"
This commit is contained in:
@@ -4139,7 +4139,7 @@ def clear_printer_cache():
|
||||
|
||||
@app.route("/api/printers/monitor/live-status", methods=["GET"])
|
||||
@login_required
|
||||
@limit_requests("printer_monitor_live", 60, 5) # 5 Anfragen pro Minute
|
||||
@limit_requests("printer_monitor_live")
|
||||
def get_live_printer_monitor_status():
|
||||
"""
|
||||
Live-Druckerstatus über den neuen PrinterMonitor mit Session-Caching.
|
||||
@@ -4180,7 +4180,7 @@ def get_live_printer_monitor_status():
|
||||
|
||||
@app.route("/api/printers/monitor/summary", methods=["GET"])
|
||||
@login_required
|
||||
@limit_requests("printer_monitor_summary", 30, 10) # 10 Anfragen pro 30 Sekunden
|
||||
@limit_requests("printer_monitor_summary")
|
||||
def get_printer_monitor_summary():
|
||||
"""
|
||||
Schnelle Zusammenfassung des Druckerstatus ohne vollständige Details.
|
||||
@@ -4204,7 +4204,7 @@ def get_printer_monitor_summary():
|
||||
|
||||
@app.route("/api/printers/monitor/clear-cache", methods=["POST"])
|
||||
@login_required
|
||||
@limit_requests("printer_monitor_cache", 120, 3) # 3 Anfragen pro 2 Minuten
|
||||
@limit_requests("printer_monitor_cache")
|
||||
def clear_printer_monitor_cache():
|
||||
"""
|
||||
Löscht alle Caches des Drucker-Monitors.
|
||||
@@ -4230,7 +4230,7 @@ def clear_printer_monitor_cache():
|
||||
@app.route("/api/printers/monitor/initialize-outlets", methods=["POST"])
|
||||
@login_required
|
||||
@admin_required
|
||||
@limit_requests("printer_monitor_init", 300, 2) # 2 Anfragen pro 5 Minuten
|
||||
@limit_requests("printer_monitor_init")
|
||||
def initialize_printer_outlets():
|
||||
"""
|
||||
Initialisiert alle Drucker-Steckdosen (schaltet sie aus für einheitlichen Zustand).
|
||||
|
Reference in New Issue
Block a user