feat: Implement Akte webhook for EspoCRM to queue entity IDs for synchronization

fix: Refactor Akte sync logic to handle multiple Redis queues and improve logging
refactor: Enhance parameter flattening for EspoCRM API calls
This commit is contained in:
bsiggel
2026-03-26 09:48:46 +00:00
parent b4d35b1790
commit 3459b9342f
6 changed files with 278 additions and 127 deletions

View File

@@ -150,12 +150,16 @@ class AdvowareService:
try:
endpoint = f"api/v1/advonet/Akten/{akte_id}"
result = await self.api.api_call(endpoint, method='GET')
# API may return a list (batch response) or a single dict
if isinstance(result, list):
result = result[0] if result else None
if result:
self._log(f"[ADVO] ✅ Fetched Akte {akte_id}: {result.get('az', 'N/A')}")
return result
except Exception as e:
self._log(f"[ADVO] Error loading Akte {akte_id}: {e}", level='error')
return None