truncate file too big

This commit is contained in:
Ruben Fiszel
2023-03-29 20:04:31 +02:00
parent a8b99494eb
commit 58a46cce1d
+1 -1
View File
@@ -1779,7 +1779,7 @@ async fn handle_python_job(
let script_path_splitted = &job.script_path().split("/");
let dirs = script_path_splitted.clone().take(script_path_splitted.clone().count() - 1).join("/").replace("-", "_");
let last = script_path_splitted.clone().last().unwrap().replace("-", "_").replace(' ', '_').to_lowercase();
let last = script_path_splitted.clone().last().unwrap().replace("-", "_").replace(" ", "_").to_lowercase();
let module_dir = format!("{}/{}", job_dir, dirs );
tokio::fs::create_dir_all(format!("{module_dir}/")).await?;
let _ = write_file(&module_dir, &format!("{last}.py"), inner_content).await?;