refactor(logging): standardize logging approach across services and steps

This commit is contained in:
bsiggel
2026-03-08 21:20:49 +00:00
parent 2e449d2928
commit 2532bd89ee
14 changed files with 165 additions and 56 deletions

View File

@@ -42,16 +42,13 @@ config = {
}
async def handler(event_data: Dict[str, Any], ctx: FlowContext[Any]) -> Optional[Dict[str, Any]]:
async def handler(event_data: Dict[str, Any], ctx: FlowContext[Any]) -> None:
"""
Zentraler Sync-Handler für Beteiligte
Args:
event_data: Event data mit entity_id, action, source
ctx: Motia FlowContext
Returns:
Optional result dict
"""
entity_id = event_data.get('entity_id')
action = event_data.get('action')
@@ -61,11 +58,13 @@ async def handler(event_data: Dict[str, Any], ctx: FlowContext[Any]) -> Optional
if not entity_id:
step_logger.error("Keine entity_id im Event gefunden")
return None
return
step_logger.info(
f"🔄 Sync-Handler gestartet: {action.upper()} | Entity: {entity_id} | Source: {source}"
)
step_logger.info("=" * 80)
step_logger.info(f"🔄 BETEILIGTE SYNC HANDLER: {action.upper()}")
step_logger.info("=" * 80)
step_logger.info(f"Entity: {entity_id} | Source: {source}")
step_logger.info("=" * 80)
# Get shared Redis client (centralized)
redis_client = get_redis_client(strict=False)