feat: Enhance logging in sync utilities and add code validation script
This commit is contained in:
@@ -35,6 +35,7 @@ class BeteiligteSync:
|
||||
def __init__(self, espocrm_api: EspoCRMAPI, redis_client: redis.Redis = None, context=None):
|
||||
self.espocrm = espocrm_api
|
||||
self.context = context
|
||||
self.logger = context.logger if context else logger
|
||||
self.redis = redis_client or self._init_redis()
|
||||
self.notification_manager = NotificationManager(espocrm_api=self.espocrm, context=context)
|
||||
|
||||
@@ -214,7 +215,7 @@ class BeteiligteSync:
|
||||
return datetime.fromisoformat(ts)
|
||||
|
||||
except Exception as e:
|
||||
logger.warn(f"Konnte Timestamp nicht parsen: {ts} - {e}")
|
||||
self.logger.warn(f"Konnte Timestamp nicht parsen: {ts} - {e}")
|
||||
return None
|
||||
|
||||
return None
|
||||
|
||||
@@ -225,7 +225,7 @@ class KommunikationSyncManager:
|
||||
self.logger.info(f"[KOMM] - Kommunikation rowIds count: {len(komm_rowids)}")
|
||||
|
||||
if espo_changed_since_sync and advo_changed_since_sync:
|
||||
self.logger.warning(f"[KOMM] ⚠️ KONFLIKT: Beide Seiten geändert seit letztem Sync - EspoCRM WINS")
|
||||
self.logger.warn(f"[KOMM] ⚠️ KONFLIKT: Beide Seiten geändert seit letztem Sync - EspoCRM WINS")
|
||||
espo_wins = True
|
||||
else:
|
||||
espo_wins = False
|
||||
|
||||
Reference in New Issue
Block a user