📚 Improved backend code structure & logging consistency 🖥️🔍

This commit is contained in:
Till Tomczak
2025-06-20 12:17:19 +02:00
parent b29b38c8a4
commit 286a70b01f
9 changed files with 306 additions and 2 deletions

View File

@ -880,6 +880,12 @@ def get_user_activity_chart():
"""
try:
db_session = get_db_session()
if db_session is None:
api_logger.error("Datenbankverbindung fehlgeschlagen")
return jsonify({
'error': 'Datenbankverbindung fehlgeschlagen',
'message': 'Keine Verbindung zur Datenbank möglich'
}), 500
# Top 10 aktivste Benutzer (nach Job-Anzahl)
from sqlalchemy import func