worker: simplify cancelation

The cancellation informations where moved from bottom to top where the
infromations are already set within the queue table.
This commit is contained in:
Abel Lucas
2024-12-16 14:42:56 +01:00
parent eac92e4230
commit 90ad56d582
24 changed files with 44 additions and 229 deletions

View File

@@ -154,7 +154,6 @@ async fn cache_hub_scripts(file_path: Option<String>) -> anyhow::Result<()> {
&Uuid::nil(),
&res.content,
&mut 0,
&mut None,
&job_dir,
None,
"global",
@@ -173,7 +172,6 @@ async fn cache_hub_scripts(file_path: Option<String>) -> anyhow::Result<()> {
let envs = windmill_worker::get_common_bun_proc_envs(None).await;
let _ = windmill_worker::install_bun_lockfile(
&mut 0,
&mut None,
&job_id,
"admins",
None,

View File

@@ -1592,7 +1592,6 @@ async fn handle_zombie_jobs(db: &Pool<Postgres>, base_internal_url: &str, worker
&client,
&job,
0,
None,
error::Error::ExecutionErr(format!(
"Job timed out after no ping from job since {} (ZOMBIE_JOB_TIMEOUT: {})",
last_ping

View File

@@ -1,10 +1,5 @@
#[cfg(unix)]
use std::{
collections::HashMap,
os::unix::fs::PermissionsExt,
path::PathBuf,
process::Stdio,
};
use std::{collections::HashMap, os::unix::fs::PermissionsExt, path::PathBuf, process::Stdio};
#[cfg(windows)]
use std::{
@@ -24,12 +19,13 @@ use windmill_common::{
worker::{to_raw_value, write_file, write_file_at_user_defined_location, WORKER_CONFIG},
};
use windmill_parser_yaml::{AnsibleRequirements, ResourceOrVariablePath};
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
use crate::{
bash_executor::BIN_BASH,
common::{
check_executor_binary_exists, get_reserved_variables, read_and_check_result, start_child_process, transform_json, OccupancyMetrics
check_executor_binary_exists, get_reserved_variables, read_and_check_result,
start_child_process, transform_json, OccupancyMetrics,
},
handle_child::handle_child,
python_executor::{create_dependencies_dir, handle_python_reqs, uv_pip_compile},
@@ -57,7 +53,6 @@ async fn handle_ansible_python_deps(
worker_name: &str,
worker_dir: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
occupancy_metrics: &mut OccupancyMetrics,
) -> error::Result<Vec<String>> {
create_dependencies_dir(job_dir).await;
@@ -82,7 +77,6 @@ async fn handle_ansible_python_deps(
job_id,
&requirements,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -109,7 +103,6 @@ async fn handle_ansible_python_deps(
job_id,
w_id,
mem_peak,
canceled_by,
db,
worker_name,
job_dir,
@@ -131,7 +124,6 @@ async fn install_galaxy_collections(
worker_name: &str,
w_id: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
db: &sqlx::Pool<sqlx::Postgres>,
occupancy_metrics: &mut OccupancyMetrics,
) -> anyhow::Result<()> {
@@ -169,7 +161,6 @@ async fn install_galaxy_collections(
job_id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,
@@ -191,7 +182,6 @@ pub async fn handle_ansible_job(
worker_name: &str,
job: &QueuedJob,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
inner_content: &String,
@@ -200,7 +190,11 @@ pub async fn handle_ansible_job(
envs: HashMap<String, String>,
occupancy_metrics: &mut OccupancyMetrics,
) -> windmill_common::error::Result<Box<RawValue>> {
check_executor_binary_exists("ansible-playbook", ANSIBLE_PLAYBOOK_PATH.as_str(), "ansible")?;
check_executor_binary_exists(
"ansible-playbook",
ANSIBLE_PLAYBOOK_PATH.as_str(),
"ansible",
)?;
let (logs, reqs, playbook) = windmill_parser_yaml::parse_ansible_reqs(inner_content)?;
append_logs(&job.id, &job.workspace_id, logs, db).await;
@@ -216,7 +210,6 @@ pub async fn handle_ansible_job(
worker_name,
worker_dir,
mem_peak,
canceled_by,
occupancy_metrics,
)
.await?;
@@ -289,7 +282,6 @@ pub async fn handle_ansible_job(
worker_name,
&job.workspace_id,
mem_peak,
canceled_by,
db,
occupancy_metrics,
)
@@ -425,7 +417,6 @@ fi
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,

View File

@@ -25,7 +25,7 @@ use windmill_common::DB;
#[cfg(feature = "dind")]
use windmill_common::error::to_anyhow;
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
lazy_static::lazy_static! {
pub static ref BIN_BASH: String = std::env::var("BASH_PATH").unwrap_or_else(|_| "/bin/bash".to_string());
@@ -62,7 +62,6 @@ lazy_static::lazy_static! {
#[tracing::instrument(level = "trace", skip_all)]
pub async fn handle_bash_job(
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job: &QueuedJob,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
@@ -206,7 +205,6 @@ exit $exit_status
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,
@@ -226,7 +224,6 @@ exit $exit_status
db,
job.timeout,
mem_peak,
canceled_by,
worker_name,
occupancy_metrics,
_killpill_rx,
@@ -271,7 +268,6 @@ async fn handle_docker_job(
db: &DB,
job_timeout: Option<i32>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
occupancy_metrics: &mut OccupancyMetrics,
killpill_rx: &mut tokio::sync::broadcast::Receiver<()>,
@@ -361,7 +357,6 @@ async fn handle_docker_job(
job_timeout,
db,
mem_peak,
canceled_by,
wait_f,
worker_name,
workspace_id,
@@ -458,7 +453,6 @@ fn raw_to_string(x: &str) -> String {
#[tracing::instrument(level = "trace", skip_all)]
pub async fn handle_powershell_job(
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job: &QueuedJob,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
@@ -548,7 +542,6 @@ pub async fn handle_powershell_job(
&job.id,
db,
mem_peak,
canceled_by,
child,
false,
worker_name,
@@ -759,7 +752,6 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"",
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,

View File

@@ -9,7 +9,7 @@ use windmill_common::{error::Error, worker::to_raw_value};
use windmill_parser_sql::{
parse_bigquery_sig, parse_db_resource, parse_sql_blocks, parse_sql_statement_named_params,
};
use windmill_queue::{CanceledBy, HTTP_CLIENT};
use windmill_queue::HTTP_CLIENT;
use serde::Deserialize;
@@ -207,7 +207,6 @@ pub async fn do_bigquery(
query: &str,
db: &sqlx::Pool<sqlx::Postgres>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
column_order: &mut Option<Vec<String>>,
occupancy_metrics: &mut OccupancyMetrics,
@@ -361,7 +360,6 @@ pub async fn do_bigquery(
job.timeout,
db,
mem_peak,
canceled_by,
result_f.map_err(to_anyhow),
worker_name,
&job.workspace_id,

View File

@@ -12,7 +12,7 @@ use serde_json::value::RawValue;
use sha2::Digest;
use uuid::Uuid;
use windmill_parser_ts::remove_pinned_imports;
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
#[cfg(feature = "enterprise")]
use crate::common::build_envs_map;
@@ -85,7 +85,6 @@ fn split_lockfile(lockfile: &str) -> (&str, Option<&str>, bool) {
pub async fn gen_bun_lockfile(
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_id: &Uuid,
w_id: &str,
db: Option<&sqlx::Pool<sqlx::Postgres>>,
@@ -149,7 +148,6 @@ pub async fn gen_bun_lockfile(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -174,7 +172,6 @@ pub async fn gen_bun_lockfile(
if !empty_deps {
install_bun_lockfile(
mem_peak,
canceled_by,
job_id,
w_id,
db,
@@ -261,7 +258,6 @@ registry = {}
pub async fn install_bun_lockfile(
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_id: &Uuid,
w_id: &str,
db: Option<&sqlx::Pool<sqlx::Postgres>>,
@@ -332,7 +328,6 @@ pub async fn install_bun_lockfile(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -479,7 +474,6 @@ pub async fn generate_wrapper_mjs(
db: &sqlx::Pool<sqlx::Postgres>,
timeout: Option<i32>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
common_bun_proc_envs: &HashMap<String, String>,
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
) -> Result<()> {
@@ -501,7 +495,6 @@ pub async fn generate_wrapper_mjs(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -528,7 +521,6 @@ pub async fn generate_bun_bundle(
db: Option<sqlx::Pool<sqlx::Postgres>>,
timeout: Option<i32>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
common_bun_proc_envs: &HashMap<String, String>,
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
) -> Result<()> {
@@ -551,7 +543,6 @@ pub async fn generate_bun_bundle(
job_id,
&db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -720,7 +711,6 @@ pub async fn prebundle_bun_script(
db.clone(),
None,
&mut 0,
&mut None,
&common_bun_proc_envs,
occupancy_metrics,
)
@@ -811,7 +801,6 @@ pub async fn handle_bun_job(
requirements_o: Option<&String>,
codebase: Option<&String>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job: &QueuedJob,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
@@ -939,7 +928,6 @@ pub async fn handle_bun_job(
if !skip_install {
install_bun_lockfile(
mem_peak,
canceled_by,
&job.id,
&job.workspace_id,
Some(db),
@@ -977,7 +965,6 @@ pub async fn handle_bun_job(
append_logs(&job.id, &job.workspace_id, logs1, db).await;
let _ = gen_bun_lockfile(
mem_peak,
canceled_by,
&job.id,
&job.workspace_id,
Some(db),
@@ -1223,7 +1210,6 @@ try {{
Some(db.clone()),
job.timeout,
mem_peak,
canceled_by,
&common_bun_proc_envs,
&mut Some(occupancy_metrics),
)
@@ -1265,7 +1251,6 @@ try {{
db,
job.timeout,
mem_peak,
canceled_by,
&common_bun_proc_envs,
&mut Some(occupancy_metrics),
)
@@ -1312,7 +1297,6 @@ try {{
job.timeout,
db,
mem_peak,
canceled_by,
worker_name,
&job.workspace_id,
false,
@@ -1461,7 +1445,6 @@ try {{
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,
@@ -1553,7 +1536,6 @@ pub async fn start_worker(
) -> Result<()> {
let mut logs = "".to_string();
let mut mem_peak: i32 = 0;
let mut canceled_by: Option<CanceledBy> = None;
tracing::info!("Starting worker {w_id};{script_path} (codebase: {codebase:?}");
if !codebase.is_some() {
let _ = write_file(job_dir, "main.ts", inner_content)?;
@@ -1612,7 +1594,6 @@ pub async fn start_worker(
install_bun_lockfile(
&mut mem_peak,
&mut canceled_by,
&Uuid::nil(),
&w_id,
Some(db),
@@ -1629,7 +1610,6 @@ pub async fn start_worker(
logs.push_str("\n\n--- BUN INSTALL ---\n");
let _ = gen_bun_lockfile(
&mut mem_peak,
&mut canceled_by,
&Uuid::nil(),
&w_id,
Some(db),
@@ -1736,7 +1716,6 @@ for await (const line of Readline.createInterface({{ input: process.stdin }})) {
db,
None,
&mut mem_peak,
&mut canceled_by,
&common_bun_proc_envs,
&mut None,
)

View File

@@ -23,8 +23,6 @@ use windmill_common::jobs::QueuedJob;
#[cfg(feature = "csharp")]
use windmill_queue::append_logs;
use windmill_queue::CanceledBy;
#[cfg(feature = "csharp")]
use crate::{
common::{
@@ -60,7 +58,6 @@ pub async fn generate_nuget_lockfile(
job_id: &Uuid,
code: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -88,7 +85,6 @@ pub async fn generate_nuget_lockfile(
job_id,
db,
mem_peak,
canceled_by,
gen_lockfile_process,
false,
worker_name,
@@ -118,7 +114,6 @@ pub async fn generate_nuget_lockfile(
_job_id: &Uuid,
_code: &str,
_mem_peak: &mut i32,
_canceled_by: &mut Option<CanceledBy>,
_job_dir: &str,
_db: &sqlx::Pool<sqlx::Postgres>,
_worker_name: &str,
@@ -261,7 +256,6 @@ namespace WindmillScriptCSharpInternal {{
async fn build_cs_proj(
job_id: &Uuid,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -310,7 +304,6 @@ async fn build_cs_proj(
job_id,
db,
mem_peak,
canceled_by,
build_cs_process,
false,
worker_name,
@@ -363,7 +356,6 @@ fn remove_lines_from_text(contents: &str, indices_to_remove: Vec<usize>) -> Stri
#[cfg(not(feature = "csharp"))]
pub async fn handle_csharp_job(
_mem_peak: &mut i32,
_canceled_by: &mut Option<CanceledBy>,
_job: &QueuedJob,
_db: &sqlx::Pool<sqlx::Postgres>,
_client: &AuthedClientBackgroundTask,
@@ -382,7 +374,6 @@ pub async fn handle_csharp_job(
#[cfg(feature = "csharp")]
pub async fn handle_csharp_job(
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job: &QueuedJob,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
@@ -452,7 +443,6 @@ pub async fn handle_csharp_job(
build_cs_proj(
&job.id,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -523,7 +513,6 @@ pub async fn handle_csharp_job(
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,

View File

@@ -185,14 +185,14 @@ pub async fn handle_dedicated_process(
let result = Arc::new(result);
append_logs(&job.id, &job.workspace_id, logs.clone(), db).await;
if line.starts_with("wm_res[success]:") {
job_completed_tx.send(JobCompleted { job , result, mem_peak: 0, canceled_by: None, success: true, cached_res_path: None, token: token.to_string(), duration: None }).await.unwrap()
job_completed_tx.send(JobCompleted { job , result, mem_peak: 0, success: true, cached_res_path: None, token: token.to_string(), duration: None }).await.unwrap()
} else {
job_completed_tx.send(JobCompleted { job , result, mem_peak: 0, canceled_by: None, success: false, cached_res_path: None, token: token.to_string(), duration: None }).await.unwrap()
job_completed_tx.send(JobCompleted { job , result, mem_peak: 0, success: false, cached_res_path: None, token: token.to_string(), duration: None }).await.unwrap()
}
},
Err(e) => {
tracing::error!("Could not deserialize job result `{line}`: {e:?}");
job_completed_tx.send(JobCompleted { job , result: Arc::new(to_raw_value(&serde_json::json!({"error": format!("Could not deserialize job result `{line}`: {e:?}")}))), mem_peak: 0, canceled_by: None, success: false, cached_res_path: None, token: token.to_string(), duration: None }).await.unwrap();
job_completed_tx.send(JobCompleted { job , result: Arc::new(to_raw_value(&serde_json::json!({"error": format!("Could not deserialize job result `{line}`: {e:?}")}))), mem_peak: 0, success: false, cached_res_path: None, token: token.to_string(), duration: None }).await.unwrap();
},
};
logs = init_log.clone();

View File

@@ -3,7 +3,7 @@ use std::{collections::HashMap, process::Stdio};
use itertools::Itertools;
use serde_json::value::RawValue;
use uuid::Uuid;
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
use crate::{
common::{
@@ -100,7 +100,6 @@ pub async fn generate_deno_lock(
job_id: &Uuid,
code: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: Option<&sqlx::Pool<sqlx::Postgres>>,
w_id: &str,
@@ -152,7 +151,6 @@ pub async fn generate_deno_lock(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -181,7 +179,6 @@ pub async fn generate_deno_lock(
pub async fn handle_deno_job(
requirements_o: Option<&String>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job: &QueuedJob,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
@@ -412,7 +409,6 @@ try {{
&job.id,
db,
mem_peak,
canceled_by,
child,
false,
worker_name,

View File

@@ -12,7 +12,7 @@ use windmill_common::{
worker::{save_cache, write_file},
};
use windmill_parser_go::{parse_go_imports, REQUIRE_PARSE};
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
use crate::{
common::{
@@ -35,7 +35,6 @@ pub const GO_OBJECT_STORE_PREFIX: &str = "gobin/";
#[tracing::instrument(level = "trace", skip_all)]
pub async fn handle_go_job(
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job: &QueuedJob,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
@@ -83,7 +82,6 @@ pub async fn handle_go_job(
&job.id,
inner_content,
mem_peak,
canceled_by,
job_dir,
db,
true,
@@ -203,7 +201,6 @@ func Run(req Req) (interface{{}}, error){{
&job.id,
db,
mem_peak,
canceled_by,
build_go_process,
false,
worker_name,
@@ -307,7 +304,6 @@ func Run(req Req) (interface{{}}, error){{
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,
@@ -347,7 +343,6 @@ pub async fn install_go_dependencies(
job_id: &Uuid,
code: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
non_dep_job: bool,
@@ -371,7 +366,6 @@ pub async fn install_go_dependencies(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -437,7 +431,6 @@ pub async fn install_go_dependencies(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,

View File

@@ -8,7 +8,7 @@ use windmill_common::jobs::QueuedJob;
use windmill_common::worker::to_raw_value;
use windmill_common::{error::Error, worker::CLOUD_HOSTED};
use windmill_parser_graphql::parse_graphql_sig;
use windmill_queue::{CanceledBy, HTTP_CLIENT};
use windmill_queue::HTTP_CLIENT;
use serde::Deserialize;
@@ -40,7 +40,6 @@ pub async fn do_graphql(
query: &str,
db: &sqlx::Pool<sqlx::Postgres>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
occupation_metrics: &mut OccupancyMetrics,
) -> windmill_common::error::Result<Box<RawValue>> {
@@ -149,7 +148,6 @@ pub async fn do_graphql(
job.timeout,
db,
mem_peak,
canceled_by,
result_f,
worker_name,
&job.workspace_id,

View File

@@ -92,7 +92,6 @@ pub async fn handle_child(
job_id: &Uuid,
db: &Pool<Postgres>,
mem_peak: &mut i32,
canceled_by_ref: &mut Option<CanceledBy>,
mut child: Child,
nsjail: bool,
worker: &str,
@@ -136,7 +135,6 @@ pub async fn handle_child(
job_id,
db,
mem_peak,
canceled_by_ref,
Box::pin(stream::unfold((), move |_| async move {
Some((get_mem_peak(pid, nsjail).await, ()))
})),
@@ -493,7 +491,6 @@ pub async fn run_future_with_polling_update_job_poller<Fut, T, S>(
timeout: Option<i32>,
db: &DB,
mem_peak: &mut i32,
canceled_by_ref: &mut Option<CanceledBy>,
result_f: Fut,
worker_name: &str,
w_id: &str,
@@ -510,7 +507,6 @@ where
job_id,
db,
mem_peak,
canceled_by_ref,
get_mem,
worker_name,
w_id,
@@ -556,7 +552,6 @@ pub async fn update_job_poller<S>(
job_id: Uuid,
db: &DB,
mem_peak: &mut i32,
canceled_by_ref: &mut Option<CanceledBy>,
mut get_mem: S,
worker_name: &str,
w_id: &str,
@@ -567,6 +562,7 @@ where
S: stream::Stream<Item = i32> + Unpin,
{
let update_job_interval = Duration::from_millis(500);
let mut cancellation = None;
let db = db.clone();
@@ -659,9 +655,9 @@ where
return UpdateJobPollingExit::AlreadyCompleted
}
if canceled {
canceled_by_ref.replace(CanceledBy {
username: canceled_by.clone(),
reason: canceled_reason.clone(),
cancellation = Some(CanceledBy {
username: canceled_by,
reason: canceled_reason,
});
break
}
@@ -672,7 +668,7 @@ where
}
tracing::info!("job {job_id} finished");
UpdateJobPollingExit::Done(canceled_by_ref.clone())
UpdateJobPollingExit::Done(cancellation)
}
/// takes stdout and stderr from Child, panics if either are not present

View File

@@ -44,7 +44,6 @@ use uuid::Uuid;
use windmill_common::error::Error;
use windmill_common::{flow_status::JobResult, DB};
use windmill_queue::CanceledBy;
use crate::{common::OccupancyMetrics, AuthedClient};
@@ -743,7 +742,6 @@ pub async fn eval_fetch_timeout(
_job_timeout: Option<i32>,
_db: &DB,
_mem_peak: &mut i32,
_canceled_by: &mut Option<CanceledBy>,
_worker_name: &str,
_w_id: &str,
_load_client: bool,
@@ -763,7 +761,6 @@ pub async fn eval_fetch_timeout(
job_timeout: Option<i32>,
db: &DB,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
w_id: &str,
load_client: bool,
@@ -913,7 +910,6 @@ pub async fn eval_fetch_timeout(
job_timeout,
db,
mem_peak,
canceled_by,
async { result_f.await? },
worker_name,
w_id,

View File

@@ -12,7 +12,7 @@ use windmill_common::error::{self, Error};
use windmill_common::worker::to_raw_value;
use windmill_common::{error::to_anyhow, jobs::QueuedJob};
use windmill_parser_sql::{parse_db_resource, parse_mssql_sig};
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
use crate::common::{build_args_values, OccupancyMetrics};
use crate::handle_child::run_future_with_polling_update_job_poller;
@@ -38,7 +38,6 @@ pub async fn do_mssql(
query: &str,
db: &sqlx::Pool<sqlx::Postgres>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
occupancy_metrics: &mut OccupancyMetrics,
) -> error::Result<Box<RawValue>> {
@@ -155,7 +154,6 @@ pub async fn do_mssql(
job.timeout,
db,
mem_peak,
canceled_by,
result_f,
worker_name,
&job.workspace_id,

View File

@@ -19,7 +19,6 @@ use windmill_parser_sql::{
parse_db_resource, parse_mysql_sig, parse_sql_blocks, parse_sql_statement_named_params,
RE_ARG_MYSQL_NAMED,
};
use windmill_queue::CanceledBy;
use crate::{
common::{build_args_map, OccupancyMetrics},
@@ -108,7 +107,6 @@ pub async fn do_mysql(
query: &str,
db: &sqlx::Pool<sqlx::Postgres>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
column_order: &mut Option<Vec<String>>,
occupancy_metrics: &mut OccupancyMetrics,
@@ -293,7 +291,6 @@ pub async fn do_mysql(
job.timeout,
db,
mem_peak,
canceled_by,
result_f,
worker_name,
&job.workspace_id,

View File

@@ -32,7 +32,6 @@ use windmill_parser::{Arg, Typ};
use windmill_parser_sql::{
parse_db_resource, parse_pg_statement_arg_indices, parse_pgsql_sig, parse_sql_blocks,
};
use windmill_queue::CanceledBy;
use crate::common::{build_args_values, sizeof_val, OccupancyMetrics};
use crate::handle_child::run_future_with_polling_update_job_poller;
@@ -161,7 +160,6 @@ pub async fn do_postgresql(
query: &str,
db: &sqlx::Pool<sqlx::Postgres>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
column_order: &mut Option<Vec<String>>,
occupancy_metrics: &mut OccupancyMetrics,
@@ -350,7 +348,6 @@ pub async fn do_postgresql(
job.timeout,
db,
mem_peak,
canceled_by,
result_f,
worker_name,
&job.workspace_id,

View File

@@ -11,11 +11,12 @@ use windmill_common::{
worker::write_file,
};
use windmill_parser::Typ;
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
use crate::{
common::{
check_executor_binary_exists, create_args_and_out_file, get_main_override, get_reserved_variables, read_result, start_child_process, OccupancyMetrics
check_executor_binary_exists, create_args_and_out_file, get_main_override,
get_reserved_variables, read_result, start_child_process, OccupancyMetrics,
},
handle_child::handle_child,
AuthedClientBackgroundTask, COMPOSER_CACHE_DIR, COMPOSER_PATH, DISABLE_NSJAIL, DISABLE_NUSER,
@@ -62,7 +63,6 @@ pub fn parse_php_imports(code: &str) -> anyhow::Result<Option<String>> {
pub async fn composer_install(
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_id: &Uuid,
w_id: &str,
db: &sqlx::Pool<sqlx::Postgres>,
@@ -94,7 +94,6 @@ pub async fn composer_install(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -134,7 +133,6 @@ $args->{arg_name} = new {rt_name}($args->{arg_name});"
pub async fn handle_php_job(
requirements_o: Option<&String>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job: &QueuedJob,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
@@ -167,7 +165,6 @@ pub async fn handle_php_job(
composer_install(
mem_peak,
canceled_by,
&job.id,
&job.workspace_id,
db,
@@ -324,7 +321,6 @@ try {{
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,

View File

@@ -32,7 +32,7 @@ use windmill_common::{
#[cfg(feature = "enterprise")]
use windmill_common::variables::get_secret_value_as_admin;
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
lazy_static::lazy_static! {
static ref PYTHON_PATH: String =
@@ -124,7 +124,6 @@ pub async fn uv_pip_compile(
job_id: &Uuid,
requirements: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &Pool<Postgres>,
worker_name: &str,
@@ -256,7 +255,6 @@ pub async fn uv_pip_compile(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -341,7 +339,6 @@ pub async fn uv_pip_compile(
job_id,
db,
mem_peak,
canceled_by,
child_process,
false,
worker_name,
@@ -514,7 +511,6 @@ pub async fn handle_python_job(
worker_name: &str,
job: &QueuedJob,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
inner_content: &String,
@@ -536,7 +532,6 @@ pub async fn handle_python_job(
worker_name,
worker_dir,
mem_peak,
canceled_by,
&mut Some(occupancy_metrics),
)
.await?;
@@ -782,7 +777,6 @@ mount {{
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,
@@ -1058,7 +1052,6 @@ async fn handle_python_deps(
worker_name: &str,
worker_dir: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
) -> error::Result<Vec<String>> {
create_dependencies_dir(job_dir).await;
@@ -1092,7 +1085,6 @@ async fn handle_python_deps(
job_id,
&requirements,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1119,7 +1111,6 @@ async fn handle_python_deps(
job_id,
w_id,
mem_peak,
canceled_by,
db,
worker_name,
job_dir,
@@ -1331,7 +1322,6 @@ pub async fn handle_python_reqs(
job_id: &Uuid,
w_id: &str,
mem_peak: &mut i32,
_canceled_by: &mut Option<CanceledBy>,
db: &sqlx::Pool<sqlx::Postgres>,
_worker_name: &str,
job_dir: &str,
@@ -1914,7 +1904,6 @@ pub async fn start_worker(
killpill_rx: tokio::sync::broadcast::Receiver<()>,
) -> error::Result<()> {
let mut mem_peak: i32 = 0;
let mut canceled_by: Option<CanceledBy> = None;
let context = variables::get_reserved_variables(
db,
w_id,
@@ -1947,7 +1936,6 @@ pub async fn start_worker(
worker_name,
job_dir,
&mut mem_peak,
&mut canceled_by,
&mut None,
)
.await?;

View File

@@ -28,7 +28,7 @@ use windmill_common::{
#[cfg(feature = "benchmark")]
use windmill_common::bench::{BenchmarkInfo, BenchmarkIter};
use windmill_queue::{append_logs, get_queued_job, CanceledBy, WrappedError};
use windmill_queue::{append_logs, get_queued_job, WrappedError};
#[cfg(feature = "prometheus")]
use windmill_queue::register_metric;
@@ -236,22 +236,12 @@ async fn send_job_completed(
job: Arc<QueuedJob>,
result: Arc<Box<RawValue>>,
mem_peak: i32,
canceled_by: Option<CanceledBy>,
success: bool,
cached_res_path: Option<String>,
token: String,
duration: Option<i64>,
) {
let jc = JobCompleted {
job,
result,
mem_peak,
canceled_by,
success,
cached_res_path,
token,
duration,
};
let jc = JobCompleted { job, result, mem_peak, success, cached_res_path, token, duration };
job_completed_tx
.send(jc)
.with_context(windmill_common::otel_ee::otel_ctx())
@@ -265,7 +255,6 @@ pub async fn process_result(
job_dir: &str,
job_completed_tx: JobCompletedSender,
mem_peak: i32,
canceled_by: Option<CanceledBy>,
cached_res_path: Option<String>,
token: String,
column_order: Option<Vec<String>>,
@@ -322,7 +311,6 @@ pub async fn process_result(
job,
r,
mem_peak,
canceled_by,
true,
cached_res_path,
token,
@@ -367,7 +355,6 @@ pub async fn process_result(
job,
Arc::new(to_raw_value(&error_value)),
mem_peak,
canceled_by,
false,
cached_res_path,
token,
@@ -400,7 +387,6 @@ pub async fn handle_receive_completed_job(
};
let job = jc.job.clone();
let mem_peak = jc.mem_peak.clone();
let canceled_by = jc.canceled_by.clone();
match process_completed_job(
jc,
&client,
@@ -420,7 +406,6 @@ pub async fn handle_receive_completed_job(
&client,
job.as_ref(),
mem_peak,
canceled_by,
err,
false,
same_worker_tx.clone(),
@@ -438,7 +423,7 @@ pub async fn handle_receive_completed_job(
}
pub async fn process_completed_job(
JobCompleted { job, result, mem_peak, success, cached_res_path, canceled_by, duration, .. }: JobCompleted,
JobCompleted { job, result, mem_peak, success, cached_res_path, duration, .. }: JobCompleted,
client: &AuthedClient,
db: &DB,
worker_dir: &str,
@@ -465,7 +450,7 @@ pub async fn process_completed_job(
false,
Json(&result),
mem_peak.to_owned(),
canceled_by,
None,
false,
duration,
)
@@ -505,7 +490,7 @@ pub async fn process_completed_job(
db,
&job,
mem_peak.to_owned(),
canceled_by,
None,
serde_json::from_str(result.get()).unwrap_or_else(
|_| json!({ "message": format!("Non serializable error: {}", result.get()) }),
),
@@ -549,7 +534,6 @@ pub async fn handle_job_error(
client: &AuthedClient,
job: &QueuedJob,
mem_peak: i32,
canceled_by: Option<CanceledBy>,
err: Error,
unrecoverable: bool,
same_worker_tx: SameWorkerSender,
@@ -575,7 +559,7 @@ pub async fn handle_job_error(
db,
job,
mem_peak,
canceled_by.clone(),
None,
err.clone(),
worker_name,
false,
@@ -635,7 +619,7 @@ pub async fn handle_job_error(
db,
&parent_job,
mem_peak,
canceled_by.clone(),
None,
e,
worker_name,
false,

View File

@@ -11,11 +11,12 @@ use windmill_common::{
utils::calculate_hash,
worker::{save_cache, write_file},
};
use windmill_queue::{append_logs, CanceledBy};
use windmill_queue::append_logs;
use crate::{
common::{
check_executor_binary_exists, create_args_and_out_file, get_reserved_variables, read_result, start_child_process, OccupancyMetrics
check_executor_binary_exists, create_args_and_out_file, get_reserved_variables,
read_result, start_child_process, OccupancyMetrics,
},
handle_child::handle_child,
AuthedClientBackgroundTask, DISABLE_NSJAIL, DISABLE_NUSER, HOME_ENV, NSJAIL_PATH, PATH_ENV,
@@ -124,7 +125,6 @@ pub async fn generate_cargo_lockfile(
job_id: &Uuid,
code: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -154,7 +154,6 @@ pub async fn generate_cargo_lockfile(
job_id,
db,
mem_peak,
canceled_by,
gen_lockfile_process,
false,
worker_name,
@@ -176,7 +175,6 @@ pub async fn generate_cargo_lockfile(
pub async fn build_rust_crate(
job_id: &Uuid,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -216,7 +214,6 @@ pub async fn build_rust_crate(
job_id,
db,
mem_peak,
canceled_by,
build_rust_process,
false,
worker_name,
@@ -273,7 +270,6 @@ pub fn compute_rust_hash(code: &str, requirements_o: Option<&String>) -> String
#[tracing::instrument(level = "trace", skip_all)]
pub async fn handle_rust_job(
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job: &QueuedJob,
db: &sqlx::Pool<sqlx::Postgres>,
client: &AuthedClientBackgroundTask,
@@ -327,7 +323,6 @@ pub async fn handle_rust_job(
build_rust_crate(
&job.id,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -395,7 +390,6 @@ pub async fn handle_rust_job(
&job.id,
db,
mem_peak,
canceled_by,
child,
!*DISABLE_NSJAIL,
worker_name,

View File

@@ -13,7 +13,7 @@ use windmill_common::error::to_anyhow;
use windmill_common::jobs::QueuedJob;
use windmill_common::{error::Error, worker::to_raw_value};
use windmill_parser_sql::{parse_db_resource, parse_snowflake_sig, parse_sql_blocks};
use windmill_queue::{CanceledBy, HTTP_CLIENT};
use windmill_queue::HTTP_CLIENT;
use serde::{Deserialize, Serialize};
@@ -244,7 +244,6 @@ pub async fn do_snowflake(
query: &str,
db: &sqlx::Pool<sqlx::Postgres>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
column_order: &mut Option<Vec<String>>,
occupancy_metrics: &mut OccupancyMetrics,
@@ -414,7 +413,6 @@ pub async fn do_snowflake(
job.timeout,
db,
mem_peak,
canceled_by,
result_f.map_err(to_anyhow),
worker_name,
&job.workspace_id,

View File

@@ -63,7 +63,7 @@ use windmill_common::{
};
use windmill_queue::{
append_logs, canceled_job_to_result, empty_result, pull, push, CanceledBy, PulledJob, PushArgs,
append_logs, canceled_job_to_result, empty_result, pull, push, PulledJob, PushArgs,
PushIsolationLevel, HTTP_CLIENT,
};
@@ -1438,7 +1438,6 @@ pub async fn run_worker(
mem_peak: 0,
cached_res_path: None,
token: "".to_string(),
canceled_by: None,
duration: None,
})
.await
@@ -1620,7 +1619,6 @@ pub async fn run_worker(
&authed_client.get_authed().await,
arc_job.as_ref(),
0,
None,
err,
false,
same_worker_tx.clone(),
@@ -1835,7 +1833,6 @@ pub struct JobCompleted {
pub success: bool,
pub cached_res_path: Option<String>,
pub token: String,
pub canceled_by: Option<CanceledBy>,
pub duration: Option<i64>,
}
@@ -1846,7 +1843,6 @@ async fn do_nativets(
code: String,
db: &Pool<Postgres>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
worker_name: &str,
occupancy_metrics: &mut OccupancyMetrics,
) -> windmill_common::error::Result<Box<RawValue>> {
@@ -1866,7 +1862,6 @@ async fn do_nativets(
job.timeout,
db,
mem_peak,
canceled_by,
worker_name,
&job.workspace_id,
true,
@@ -2008,7 +2003,6 @@ async fn handle_queued_job(
job,
result,
mem_peak: 0,
canceled_by: None,
success: true,
cached_res_path: None,
token: authed_client.token,
@@ -2042,7 +2036,6 @@ async fn handle_queued_job(
} else {
let mut logs = "".to_string();
let mut mem_peak: i32 = 0;
let mut canceled_by: Option<CanceledBy> = None;
// println!("handle queue {:?}", SystemTime::now());
logs.push_str(&format!(
@@ -2084,7 +2077,6 @@ async fn handle_queued_job(
&job,
preview_data.as_ref(),
&mut mem_peak,
&mut canceled_by,
job_dir,
db,
worker_name,
@@ -2100,7 +2092,6 @@ async fn handle_queued_job(
&job,
preview_data.as_ref(),
&mut mem_peak,
&mut canceled_by,
job_dir,
db,
worker_name,
@@ -2114,7 +2105,6 @@ async fn handle_queued_job(
JobKind::AppDependencies => handle_app_dependency_job(
&job,
&mut mem_peak,
&mut canceled_by,
job_dir,
db,
worker_name,
@@ -2146,7 +2136,6 @@ async fn handle_queued_job(
job_dir,
worker_dir,
&mut mem_peak,
&mut canceled_by,
base_internal_url,
worker_name,
&mut column_order,
@@ -2179,7 +2168,6 @@ async fn handle_queued_job(
job_dir,
job_completed_tx,
mem_peak,
canceled_by,
cached_res_path,
client.get_token().await,
column_order,
@@ -2272,7 +2260,6 @@ async fn handle_code_execution_job(
job_dir: &str,
#[allow(unused_variables)] worker_dir: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
base_internal_url: &str,
worker_name: &str,
column_order: &mut Option<Vec<String>>,
@@ -2364,7 +2351,6 @@ async fn handle_code_execution_job(
&code,
db,
mem_peak,
canceled_by,
worker_name,
column_order,
occupancy_metrics,
@@ -2383,7 +2369,6 @@ async fn handle_code_execution_job(
&code,
db,
mem_peak,
canceled_by,
worker_name,
column_order,
occupancy_metrics,
@@ -2413,7 +2398,6 @@ async fn handle_code_execution_job(
&code,
db,
mem_peak,
canceled_by,
worker_name,
column_order,
occupancy_metrics,
@@ -2436,7 +2420,6 @@ async fn handle_code_execution_job(
&code,
db,
mem_peak,
canceled_by,
worker_name,
column_order,
occupancy_metrics,
@@ -2467,7 +2450,6 @@ async fn handle_code_execution_job(
&code,
db,
mem_peak,
canceled_by,
worker_name,
occupancy_metrics,
)
@@ -2480,7 +2462,6 @@ async fn handle_code_execution_job(
&code,
db,
mem_peak,
canceled_by,
worker_name,
occupancy_metrics,
)
@@ -2511,7 +2492,6 @@ async fn handle_code_execution_job(
code.clone(),
db,
mem_peak,
canceled_by,
worker_name,
occupancy_metrics,
)
@@ -2576,7 +2556,6 @@ mount {{
worker_name,
job,
mem_peak,
canceled_by,
db,
client,
&code,
@@ -2592,7 +2571,6 @@ mount {{
handle_deno_job(
lock.as_ref(),
mem_peak,
canceled_by,
job,
db,
client,
@@ -2611,7 +2589,6 @@ mount {{
lock.as_ref(),
codebase.as_ref(),
mem_peak,
canceled_by,
job,
db,
client,
@@ -2629,7 +2606,6 @@ mount {{
Some(ScriptLang::Go) => {
handle_go_job(
mem_peak,
canceled_by,
job,
db,
client,
@@ -2647,7 +2623,6 @@ mount {{
Some(ScriptLang::Bash) => {
handle_bash_job(
mem_peak,
canceled_by,
job,
db,
client,
@@ -2665,7 +2640,6 @@ mount {{
Some(ScriptLang::Powershell) => {
handle_powershell_job(
mem_peak,
canceled_by,
job,
db,
client,
@@ -2689,7 +2663,6 @@ mount {{
handle_php_job(
lock.as_ref(),
mem_peak,
canceled_by,
job,
db,
client,
@@ -2712,7 +2685,6 @@ mount {{
#[cfg(feature = "rust")]
handle_rust_job(
mem_peak,
canceled_by,
job,
db,
client,
@@ -2741,7 +2713,6 @@ mount {{
worker_name,
job,
mem_peak,
canceled_by,
db,
client,
&code,
@@ -2755,7 +2726,6 @@ mount {{
Some(ScriptLang::CSharp) => {
handle_csharp_job(
mem_peak,
canceled_by,
job,
db,
client,

View File

@@ -55,8 +55,8 @@ use windmill_common::{
};
use windmill_queue::schedule::get_schedule_opt;
use windmill_queue::{
add_completed_job, add_completed_job_error, append_logs, handle_maybe_scheduled_job,
CanceledBy, PushArgs, PushIsolationLevel, WrappedError,
add_completed_job, add_completed_job_error, append_logs, handle_maybe_scheduled_job, PushArgs,
PushIsolationLevel, WrappedError,
};
type DB = sqlx::Pool<sqlx::Postgres>;
@@ -1050,10 +1050,7 @@ pub async fn update_flow_status_after_job_completion_internal(
db,
&flow_job,
0,
Some(CanceledBy {
username: flow_job.canceled_by.clone(),
reason: flow_job.canceled_reason.clone(),
}),
None,
canceled_job_to_result(&flow_job),
worker_name,
true,

View File

@@ -30,7 +30,7 @@ use windmill_git_sync::{handle_deployment_metadata, DeployedObject};
#[cfg(feature = "python")]
use windmill_parser_py_imports::parse_relative_imports;
use windmill_parser_ts::parse_expr_for_imports;
use windmill_queue::{append_logs, CanceledBy, PushIsolationLevel};
use windmill_queue::{append_logs, PushIsolationLevel};
use crate::common::OccupancyMetrics;
use crate::csharp_executor::generate_nuget_lockfile;
@@ -220,7 +220,6 @@ pub async fn handle_dependency_job(
job: &QueuedJob,
preview_data: Option<&RawData>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -276,7 +275,6 @@ pub async fn handle_dependency_job(
})?,
&script_data.code,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -539,7 +537,6 @@ pub async fn handle_flow_dependency_job(
job: &QueuedJob,
preview_data: Option<&RawData>,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -615,7 +612,6 @@ pub async fn handle_flow_dependency_job(
flow.modules,
job,
mem_peak,
canceled_by,
job_dir,
db,
tx,
@@ -739,7 +735,6 @@ async fn lock_modules<'c>(
modules: Vec<FlowModule>,
job: &QueuedJob,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
mut tx: sqlx::Transaction<'c, sqlx::Postgres>,
@@ -787,7 +782,6 @@ async fn lock_modules<'c>(
modules,
job,
mem_peak,
canceled_by,
job_dir,
db,
tx,
@@ -820,7 +814,6 @@ async fn lock_modules<'c>(
b.modules,
job,
mem_peak,
canceled_by,
job_dir,
db,
tx,
@@ -845,7 +838,6 @@ async fn lock_modules<'c>(
modules,
job,
mem_peak,
canceled_by,
job_dir,
db,
tx,
@@ -876,7 +868,6 @@ async fn lock_modules<'c>(
b.modules,
job,
mem_peak,
canceled_by,
job_dir,
db,
tx,
@@ -898,7 +889,6 @@ async fn lock_modules<'c>(
default,
job,
mem_peak,
canceled_by,
job_dir,
db,
tx,
@@ -947,7 +937,6 @@ async fn lock_modules<'c>(
&language,
&content,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1317,7 +1306,6 @@ async fn lock_modules_app(
value: Value,
job: &QueuedJob,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -1359,7 +1347,6 @@ async fn lock_modules_app(
&language,
&content,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1420,7 +1407,6 @@ async fn lock_modules_app(
b,
job,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1443,7 +1429,6 @@ async fn lock_modules_app(
b,
job,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1465,7 +1450,6 @@ async fn lock_modules_app(
pub async fn handle_app_dependency_job(
job: &QueuedJob,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -1495,7 +1479,6 @@ pub async fn handle_app_dependency_job(
value,
job,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1587,7 +1570,6 @@ async fn python_dep(
reqs: String,
job_id: &Uuid,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -1602,7 +1584,6 @@ async fn python_dep(
job_id,
&reqs,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1619,7 +1600,6 @@ async fn python_dep(
job_id,
w_id,
mem_peak,
canceled_by,
db,
worker_name,
job_dir,
@@ -1645,7 +1625,6 @@ async fn capture_dependency_job(
job_language: &ScriptLang,
job_raw_code: &str,
mem_peak: &mut i32,
canceled_by: &mut Option<CanceledBy>,
job_dir: &str,
db: &sqlx::Pool<sqlx::Postgres>,
worker_name: &str,
@@ -1705,7 +1684,6 @@ async fn capture_dependency_job(
reqs,
job_id,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1753,7 +1731,6 @@ async fn capture_dependency_job(
reqs,
job_id,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1776,7 +1753,6 @@ async fn capture_dependency_job(
job_id,
job_raw_code,
mem_peak,
canceled_by,
job_dir,
db,
false,
@@ -1798,7 +1774,6 @@ async fn capture_dependency_job(
job_id,
job_raw_code,
mem_peak,
canceled_by,
job_dir,
Some(db),
w_id,
@@ -1817,7 +1792,6 @@ async fn capture_dependency_job(
}
let req = gen_bun_lockfile(
mem_peak,
canceled_by,
job_id,
w_id,
Some(db),
@@ -1877,7 +1851,6 @@ async fn capture_dependency_job(
};
composer_install(
mem_peak,
canceled_by,
job_id,
w_id,
db,
@@ -1907,7 +1880,6 @@ async fn capture_dependency_job(
job_id,
job_raw_code,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,
@@ -1930,7 +1902,6 @@ async fn capture_dependency_job(
job_id,
job_raw_code,
mem_peak,
canceled_by,
job_dir,
db,
worker_name,