🎉 Feature: Enhanced Admin Guest Requests API & Startup Initialization Documentation 📚

This commit is contained in:
Till Tomczak
2025-06-20 08:36:07 +02:00
parent 939f14199d
commit cbea4cb765
27 changed files with 1653 additions and 52 deletions

View File

@@ -1946,6 +1946,28 @@ def main():
if scheduler:
scheduler.start()
app_logger.info("[STARTUP] ✅ Job Scheduler gestartet")
# Steckdosen beim Systemstart initialisieren
app_logger.info("[STARTUP] Initialisiere Steckdosen (alle auf 'aus' = frei)...")
try:
initialization_results = scheduler.initialize_all_outlets_on_startup()
if initialization_results:
success_count = sum(1 for result in initialization_results.values() if result.get('success', False))
total_count = len(initialization_results)
if success_count == total_count:
app_logger.info(f"[STARTUP] ✅ Alle {total_count} Steckdosen erfolgreich initialisiert")
elif success_count > 0:
app_logger.info(f"[STARTUP] ⚡ {success_count}/{total_count} Steckdosen erfolgreich initialisiert")
else:
app_logger.warning(f"[STARTUP] ⚠️ Keine der {total_count} Steckdosen konnte initialisiert werden")
else:
app_logger.info("[STARTUP] Keine Steckdosen zur Initialisierung gefunden")
except Exception as e:
app_logger.warning(f"[STARTUP] ⚠️ Fehler bei Steckdosen-Initialisierung: {str(e)}")
else:
app_logger.warning("[STARTUP] ⚠️ Job Scheduler nicht verfügbar")