Extend debug mode in cron step to accept list of kuerzel (SB, AI, RO)

This commit is contained in:
root
2025-10-24 01:08:09 +00:00
parent 2eb8330b1d
commit 25429edd76
2 changed files with 6 additions and 5 deletions

View File

@@ -8,8 +8,8 @@ CALENDAR_SYNC_LOCK_KEY = 'calendar_sync_lock'
config = {
'type': 'cron',
'name': 'Calendar Sync Cron Job',
'description': 'Führt den Calendar Sync alle 15 Minuten automatisch aus',
'cron': '*/15 * * * *', # Alle 15 Minuten
'description': 'Führt den Calendar Sync alle 5 Minuten automatisch aus',
'cron': '*/5 * * * *', # Alle 5 Minuten
'emits': ['calendar_sync_employee'],
'flows': ['advoware']
}
@@ -45,9 +45,9 @@ async def handler(context):
context.logger.warning(f"Mitarbeiter ohne Kürzel übersprungen: {employee}")
continue
# DEBUG: Nur für Nutzer SB syncen
if kuerzel != 'SB':
context.logger.info(f"DEBUG: Überspringe {kuerzel}, nur SB wird gesynct")
# DEBUG: Nur für konfigurierte Nutzer syncen
if kuerzel not in Config.CALENDAR_SYNC_DEBUG_KUERZEL:
context.logger.info(f"DEBUG: Überspringe {kuerzel}, nur {Config.CALENDAR_SYNC_DEBUG_KUERZEL} werden gesynct")
continue
employee_lock_key = f'calendar_sync_lock_{kuerzel}'