debug: Add logging for key changes within batch grouping

This commit is contained in:
2025-12-26 09:46:52 +01:00
parent c9088d9144
commit ff0187b74a
2 changed files with 90 additions and 0 deletions

View File

@@ -341,6 +341,11 @@ class MySQLConnector:
# If key changed, yield previous group and start new one
if current_key is not None and key != current_key:
if current_group:
nodes = sorted([r.get('NodeNum') for r in current_group])
logger.info(
f"[CONSOLIDATION DEBUG] Key change within batch - yielding: key={current_key}, "
f"rows={len(current_group)}, nodes={nodes}"
)
yield current_group
logger.debug(
f"Group yielded: key={current_key}, "