Skip to content

Commit 2f1804b

Browse files
authored
fix: Fix python refetching wheels from S3 (#5133)
1 parent ecf2222 commit 2f1804b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

backend/windmill-worker/src/python_executor.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,6 +2158,18 @@ pub async fn handle_python_reqs(
21582158
db
21592159
).await;
21602160
pids.lock().await.get_mut(i).and_then(|e| e.take());
2161+
2162+
// Create a file to indicate that installation was successfull
2163+
let valid_path = venv_p.clone() + "/.valid.windmill";
2164+
// This is atomic operation, meaning, that it either completes and wheel is valid,
2165+
// or it does not and wheel is invalid and will be reinstalled next run
2166+
if let Err(e) = File::create(&valid_path).await{
2167+
tracing::error!(
2168+
workspace_id = %w_id,
2169+
job_id = %job_id,
2170+
"Failed to create {}!\n{e}\n
2171+
This file needed for python jobs to function", valid_path)
2172+
};
21612173
return Ok(());
21622174
}
21632175
}

0 commit comments

Comments
 (0)