mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-22 00:01:34 +00:00
fix: clean job dirs between flow locks
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::{create_dir_all, remove_dir_all};
|
||||
use std::path::{Component, Path, PathBuf};
|
||||
|
||||
use async_recursion::async_recursion;
|
||||
@@ -281,7 +282,9 @@ pub async fn handle_dependency_job(
|
||||
)
|
||||
.execute(db)
|
||||
.await?;
|
||||
return Err(Error::ExecutionErr(format!("Error creating schema validator: {e}")))
|
||||
return Err(Error::ExecutionErr(format!(
|
||||
"Error creating schema validator: {e}"
|
||||
)));
|
||||
}
|
||||
},
|
||||
_ => match preview_data {
|
||||
@@ -1056,6 +1059,12 @@ async fn lock_modules<'c>(
|
||||
|
||||
modified_ids.push(e.id.clone());
|
||||
|
||||
remove_dir_all(job_dir).map_err(|e| {
|
||||
Error::ExecutionErr(format!("Error removing job dir for flow step lock: {e}"))
|
||||
})?;
|
||||
create_dir_all(job_dir).map_err(|e| {
|
||||
Error::ExecutionErr(format!("Error creating job dir for flow step lock: {e}"))
|
||||
})?;
|
||||
let new_lock = capture_dependency_job(
|
||||
&job.id,
|
||||
&language,
|
||||
|
||||
Reference in New Issue
Block a user