Skip to content

Commit 9d0329b

Browse files
committed
fix: persist plan path on resume in batch executor (#563)
- Update plan_path when loading existing state if caller provides a new path - Handles cases where original path was empty or pointed to deleted temp dir
1 parent 26cbf7f commit 9d0329b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

redisvl/migration/batch_executor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ def _init_or_load_state(
260260
f"current batch plan '{batch_plan.batch_id}'. "
261261
"Remove the stale state file or use a different state_path."
262262
)
263+
# Update plan_path if caller provided one (handles cases where
264+
# the original path was empty or pointed to a deleted temp dir).
265+
if batch_plan_path:
266+
loaded.plan_path = str(Path(batch_plan_path).resolve())
263267
return loaded
264268

265269
# Create new state with plan_path for resume support

0 commit comments

Comments
 (0)