Skip to content

Commit f90aff9

Browse files
committed
Fix bug potential skipping chunks of data
1 parent 4fa4638 commit f90aff9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/odoo_data_flow/import_threaded.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,6 @@ def _execute_load_batch( # noqa: C901
11841184
)
11851185

11861186
if is_scalable_error and chunk_size > 1:
1187-
original_chunk_size = chunk_size
11881187
chunk_size = max(1, chunk_size // 2)
11891188
progress.console.print(
11901189
f"[yellow]WARN:[/] Batch {batch_number} hit scalable error. "
@@ -1237,7 +1236,7 @@ def _execute_load_batch( # noqa: C901
12371236
batch_number,
12381237
error_message=clean_error,
12391238
)
1240-
lines_to_process = lines_to_process[original_chunk_size:]
1239+
lines_to_process = lines_to_process[chunk_size:]
12411240
serialization_retry_count = 0 # Reset counter for next batch
12421241
continue
12431242
continue

0 commit comments

Comments
 (0)