🎉 Feature: Enhanced Admin Guest Requests API & Startup Initialization Documentation 📚
This commit is contained in:
@@ -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")
|
||||
|
||||
|
Reference in New Issue
Block a user