From 4f75a6ffb7f37bbb73b0a0d0d088b2f9d69d3370 Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Mon, 8 Sep 2025 13:34:01 +0700 Subject: [PATCH] fix --- src/aeros_simulation/router.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aeros_simulation/router.py b/src/aeros_simulation/router.py index 145e8f2..40a3a4a 100644 --- a/src/aeros_simulation/router.py +++ b/src/aeros_simulation/router.py @@ -240,7 +240,7 @@ async def calculate_contribution( eqs = (await db_session.execute(simulations_eq)).scalars().all() - batch_size = 100 + batch_size = 20 start_index = batch_num * batch_size end_index = start_index + batch_size @@ -304,6 +304,7 @@ async def calculate_contribution( eaf_contributions_data.append(eaf_conf) await db_session.delete(simulation) + await db_session.commit() db_session.add_all(eaf_contributions_data) await db_session.commit()