[P] Fix wrong row sending order
All checks were successful
Component testing / Hub testing (push) Successful in 27s
Component testing / Store testing (push) Successful in 29s
Component testing / Integration smoke testing (push) Successful in 2m33s

This commit is contained in:
2026-03-25 22:27:40 +02:00
parent db63eb6d79
commit 987e968dd4

View File

@@ -96,7 +96,7 @@ async def create_processed_agent_data(data: List[ProcessedAgentData], user_id: i
created_records = [dict(row._mapping) for row in result.fetchall()] created_records = [dict(row._mapping) for row in result.fetchall()]
session.commit() session.commit()
for record in created_records: for record in sorted(created_records, key = lambda x: x['timestamp']):
await send_data_to_subscribers(jsonable_encoder(record)) await send_data_to_subscribers(jsonable_encoder(record))
return created_records return created_records
except Exception as err: except Exception as err: