Skip to content

Commit

Permalink
fix: Fix python refetching wheels from S3 (#5133)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyranota authored Jan 25, 2025
1 parent ecf2222 commit 2f1804b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/windmill-worker/src/python_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,18 @@ pub async fn handle_python_reqs(
db
).await;
pids.lock().await.get_mut(i).and_then(|e| e.take());

// Create a file to indicate that installation was successfull
let valid_path = venv_p.clone() + "/.valid.windmill";
// This is atomic operation, meaning, that it either completes and wheel is valid,
// or it does not and wheel is invalid and will be reinstalled next run
if let Err(e) = File::create(&valid_path).await{
tracing::error!(
workspace_id = %w_id,
job_id = %job_id,
"Failed to create {}!\n{e}\n
This file needed for python jobs to function", valid_path)
};
return Ok(());
}
}
Expand Down

0 comments on commit 2f1804b

Please sign in to comment.