Remove unwanted loop

This commit is contained in:
Patrick Lühne 2019-03-02 01:13:06 +01:00
parent 5cfeef55d4
commit a6a1d11b3e
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -418,43 +418,40 @@ impl BenchmarkRepository
active_job_ids.insert(job_id);
}
loop
while !active_job_ids.is_empty()
{
while !active_job_ids.is_empty()
{
active_job_ids.retain
(
|job_id|
active_job_ids.retain
(
|job_id|
{
let job_repository_path = self.result_repository_path(*job_id);
let job_repository = match Repository::open(&job_repository_path)
{
let job_repository_path = self.result_repository_path(*job_id);
let job_repository = match Repository::open(&job_repository_path)
{
Ok(value) => value,
Err(error) => panic!("cannot access result repository for job {}: {}", job_id, error),
};
Ok(value) => value,
Err(error) => panic!("cannot access result repository for job {}: {}", job_id, error),
};
let job_commit = match Self::tip_commit(&job_repository, false, "master")
{
Ok(value) => value,
// Job is not done yet, so skip it until it is
Err(_) => return true,
};
let job_commit = match Self::tip_commit(&job_repository, false, "master")
{
Ok(value) => value,
// Job is not done yet, so skip it until it is
Err(_) => return true,
};
info!("job {} finished", job_id);
info!("job {} finished", job_id);
let remote_commit = match Self::tip_commit(&self.repository, true, "results")
{
Ok(value) => value,
Err(error) => panic!("could not access tip commit of “results” branch: {}", error),
};
let remote_commit = match Self::tip_commit(&self.repository, true, "results")
{
Ok(value) => value,
Err(error) => panic!("could not access tip commit of “results” branch: {}", error),
};
false
}
);
false
}
);
println!("================");
std::thread::sleep(std::time::Duration::from_secs(2));
}
println!("================");
std::thread::sleep(std::time::Duration::from_secs(2));
}
}
}