fix base_internal_url

This commit is contained in:
Ruben Fiszel
2023-11-20 02:03:41 +01:00
parent b667317d44
commit aa6bf4027f
2 changed files with 8 additions and 7 deletions
+1 -2
View File
@@ -310,8 +310,7 @@ Windmill Community Edition {GIT_VERSION}
};
let workers_f = async {
let port = base_internal_rx.await?;
let base_internal_url: String = format!("http://localhost:{}", port.to_string());
let base_internal_url = base_internal_rx.await?;
if worker_mode {
run_workers(
db.clone(),
@@ -410,6 +410,13 @@ async fn prepare_wrapper(
.to_lowercase();
let module_dir = format!("{}/{}", job_dir, dirs);
tokio::fs::create_dir_all(format!("{module_dir}/")).await?;
let last = if last.starts_with(|x: char| x.is_ascii_digit()) {
format!("_{}", last)
} else {
last
};
let _ = write_file(&module_dir, &format!("{last}.py"), inner_content).await?;
if relative_imports {
let _ = write_file(job_dir, "loader.py", RELATIVE_PYTHON_LOADER).await?;
@@ -484,11 +491,6 @@ if args["{name}"] is None:
let module_dir_dot = dirs.replace("/", ".").replace("-", "_");
let last = if last.starts_with(|x: char| x.is_ascii_digit()) {
format!("_{}", last)
} else {
last
};
Ok((
import_loader,
import_base64,