Skip to content

Commit

Permalink
Revert incorrect fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pyranota authored and sun committed Jan 3, 2025
1 parent c63d43e commit bf9c25c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions backend/windmill-worker/src/python_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use windmill_common::variables::get_secret_value_as_admin;
use windmill_queue::{append_logs, CanceledBy};

lazy_static::lazy_static! {
static ref BUSY_VENV_P: RwLock<HashSet<String>> = RwLock::new(HashSet::new());

static ref PYTHON_PATH: String =
std::env::var("PYTHON_PATH").unwrap_or_else(|_| "/usr/local/bin/python3".to_string());
Expand Down Expand Up @@ -1484,8 +1483,7 @@ pub async fn handle_python_reqs(
"{py_prefix}/{}",
req.replace(' ', "").replace('/', "").replace(':', "")
);
if metadata(&venv_p).await.is_ok() && !BUSY_VENV_P.read().await.contains(&venv_p) {
BUSY_VENV_P.write().await.insert(venv_p.clone());
if metadata(&venv_p).await.is_ok() {
req_paths.push(venv_p);
in_cache.push(req.to_string());
} else {
Expand Down Expand Up @@ -1881,9 +1879,8 @@ pub async fn handle_python_reqs(
);
}
} else {
req_paths.push(venv_p.clone());
req_paths.push(venv_p);
}
BUSY_VENV_P.write().await.remove(&venv_p);
}

if has_work {
Expand Down

0 comments on commit bf9c25c

Please sign in to comment.