fix: optimize performance for bun scripts without deps

This commit is contained in:
Ruben Fiszel
2023-09-24 19:38:41 +02:00
parent 8a26ae3172
commit 580d0fe29f
+12 -11
View File
@@ -219,18 +219,19 @@ pub async fn handle_bun_job(
})?,
)
.await?;
install_lockfile(
logs,
&job.id,
&job.workspace_id,
db,
job_dir,
worker_name,
common_bun_proc_envs.clone(),
)
.await?;
remove_dir_all(format!("{}/node_modules", job_dir)).await?;
}
install_lockfile(
logs,
&job.id,
&job.workspace_id,
db,
job_dir,
worker_name,
common_bun_proc_envs.clone(),
)
.await?;
remove_dir_all(format!("{}/node_modules", job_dir)).await?;
} else if !*DISABLE_NSJAIL {
logs.push_str("\n\n--- BUN INSTALL ---\n");
set_logs(&logs, &job.id, &db).await;