diff --git a/backend/parsers/windmill-parser-ts/src/lib.rs b/backend/parsers/windmill-parser-ts/src/lib.rs index f5098c364a..16bc131172 100644 --- a/backend/parsers/windmill-parser-ts/src/lib.rs +++ b/backend/parsers/windmill-parser-ts/src/lib.rs @@ -268,7 +268,7 @@ fn tstype_to_typ(ts_type: &TsType) -> (Typ, bool) { pub fn eval_sync(code: &str) -> Result { let mut context = JsRuntime::new(RuntimeOptions::default()); let code = format!("let x = {}; x", code); - let res = context.execute_script("", code); + let res = context.execute_script("", code.into()); match res { Ok(global) => { let scope = &mut context.handle_scope(); diff --git a/backend/windmill-worker/src/js_eval.rs b/backend/windmill-worker/src/js_eval.rs index 51c6486065..30e620ab3a 100644 --- a/backend/windmill-worker/src/js_eval.rs +++ b/backend/windmill-worker/src/js_eval.rs @@ -252,7 +252,7 @@ async function resource(path) {{ .join(""), ); tracing::debug!("{}", code); - let global = context.execute_script("", code)?; + let global = context.execute_script("", code.into())?; let global = context.resolve_value(global).await?; let scope = &mut context.handle_scope(); diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 0af5802301..f0dd257688 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -1181,7 +1181,7 @@ async fn handle_bash_job( ) -> Result { logs.push_str("\n\n--- BASH CODE EXECUTION ---\n"); set_logs(logs, &job.id, db).await; - write_file(job_dir, "main.sh", &format!("{content}\necho \"\"\nsync\necho \"\"")).await?; + write_file(job_dir, "main.sh", &format!("{content}\nsleep 0.02")).await?; let token = client.get_token().await; let mut reserved_variables = get_reserved_variables(job, &token, db).await?; reserved_variables.insert("RUST_LOG".to_string(), "info".to_string());