Refactor around meili_path

This commit is contained in:
Mubelotix
2025-08-26 11:13:40 +02:00
parent a1424e1cb4
commit baa4c75af8
2 changed files with 25 additions and 24 deletions

View File

@ -128,31 +128,12 @@ async fn execute_run(
binary_path: Option<&Path>,
run_number: u16,
) -> anyhow::Result<tokio::task::JoinHandle<anyhow::Result<std::fs::File>>> {
meili_process::delete_db();
let run_command = match binary_path {
Some(binary_path) => tokio::process::Command::new(binary_path),
None => {
meili_process::build().await?;
let mut command = tokio::process::Command::new("cargo");
command
.arg("run")
.arg("--release")
.arg("-p")
.arg("meilisearch")
.arg("--bin")
.arg("meilisearch")
.arg("--");
command
}
};
let meilisearch = meili_process::start(
meili_client,
master_key,
&workload.extra_cli_args,
&workload.name,
run_command,
binary_path,
)
.await?;