📝 🎉 Improved session management system with new backup database and enhanced logs 🌐

This commit is contained in:
2025-06-12 08:23:49 +02:00
parent 841d4cc466
commit f2be2e65a8
103 changed files with 1351 additions and 508 deletions

View File

@ -1415,3 +1415,186 @@ werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\base.html')
2025-06-12 08:12:36 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:52 - [app] app - [WARNING] WARNING - DatabaseCleanupManager nicht verfügbar - Fallback auf Legacy-Cleanup
2025-06-12 08:20:52 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-12 08:20:53 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-12 08:20:53 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-12 08:20:53 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-12 08:20:53 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-12 08:20:54 - [app] app - [WARNING] WARNING - DatabaseCleanupManager nicht verfügbar - Fallback auf Legacy-Cleanup
2025-06-12 08:20:54 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-12 08:20:55 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-12 08:20:55 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-12 08:20:55 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-12 08:20:55 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-12 08:20:55 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-12 08:20:55 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-12 08:20:55 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-12 08:20:55 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-12 08:20:56 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-12 08:20:56 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-12 08:20:56 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-12 08:20:56 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-12 08:20:56 - [app] app - [INFO] INFO - Locating template 'dashboard.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\dashboard.html')
2025-06-12 08:20:56 - [app] app - [INFO] INFO - Locating template 'base.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\base.html')
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers/monitor/live-status
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/session/status
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/user/settings
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Response: 500
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Request: GET /
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard
2025-06-12 08:20:56 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:57 - [app] app - [DEBUG] DEBUG - Request: GET /tapo/
2025-06-12 08:20:57 - [app] app - [INFO] INFO - Locating template 'tapo_control.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\tapo_control.html')
2025-06-12 08:20:57 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:57 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-12 08:20:57 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:57 - [app] app - [DEBUG] DEBUG - Request: GET /api/session/status
2025-06-12 08:20:57 - [app] app - [DEBUG] DEBUG - Request: GET /api/user/settings
2025-06-12 08:20:57 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:57 - [app] app - [DEBUG] DEBUG - Response: 500
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /jobs
2025-06-12 08:20:59 - [app] app - [INFO] INFO - Locating template 'jobs.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\jobs.html')
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/jobs
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/session/status
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/user/settings
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-12 08:20:59 - [app] app - [INFO] INFO - ✅ API: 0 Drucker abgerufen
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard
2025-06-12 08:20:59 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:21:04 - [app] app - [DEBUG] DEBUG - Request: GET /.well-known/appspecific/com.chrome.devtools.json
2025-06-12 08:21:04 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/.well-known/appspecific/com.chrome.devtools.json
2025-06-12 08:21:04 - [app] app - [INFO] INFO - Locating template 'errors/404.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\errors\\404.html')
2025-06-12 08:21:04 - [app] app - [DEBUG] DEBUG - Response: 404
2025-06-12 08:21:14 - [app] app - [DEBUG] DEBUG - Request: GET /api/jobs
2025-06-12 08:21:14 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:21:14 - [app] app - [DEBUG] DEBUG - Request: GET /auth/logout
2025-06-12 08:21:14 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:21:14 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:21:14 - [app] app - [INFO] INFO - Locating template 'login.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\login.html')
2025-06-12 08:21:14 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Request: GET /api/jobs
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Request: GET /api/jobs
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:21:29 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:21:37 - [app] app - [DEBUG] DEBUG - Request: GET /.well-known/appspecific/com.chrome.devtools.json
2025-06-12 08:21:37 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/.well-known/appspecific/com.chrome.devtools.json
2025-06-12 08:21:37 - [app] app - [DEBUG] DEBUG - Response: 404
2025-06-12 08:21:37 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-12 08:21:37 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:21:37 - [app] app - [DEBUG] DEBUG - Request: GET /.well-known/appspecific/com.chrome.devtools.json
2025-06-12 08:21:37 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/.well-known/appspecific/com.chrome.devtools.json
2025-06-12 08:21:37 - [app] app - [DEBUG] DEBUG - Response: 404
2025-06-12 08:21:37 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:21:37 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:21:57 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-12 08:21:57 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:21:57 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:21:57 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:22:27 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-12 08:22:27 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:22:27 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:22:27 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-12 08:22:57 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-12 08:22:57 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-12 08:22:57 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login
2025-06-12 08:22:57 - [app] app - [DEBUG] DEBUG - Response: 200