Add check if job is already done
This commit is contained in:
parent
3d3580d845
commit
fe51492c5b
@ -25,6 +25,12 @@ fn main()
|
|||||||
let time = instance["time"].as_i64().unwrap();
|
let time = instance["time"].as_i64().unwrap();
|
||||||
|
|
||||||
let job_key = format!("{}/{}", fruit, time);
|
let job_key = format!("{}/{}", fruit, time);
|
||||||
|
|
||||||
|
if benchmark_repository.is_job_done(&job_key)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let job = benchmark_repository.create_job(job_key);
|
let job = benchmark_repository.create_job(job_key);
|
||||||
|
|
||||||
Command::new("sbatch")
|
Command::new("sbatch")
|
||||||
|
@ -258,6 +258,11 @@ impl BenchmarkRepository
|
|||||||
Some(content.to_owned())
|
Some(content.to_owned())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_job_done(&self, key: &str) -> bool
|
||||||
|
{
|
||||||
|
self.file_exists(Path::new(key), "results")
|
||||||
|
}
|
||||||
|
|
||||||
pub fn create_job(&mut self, key: String) -> &Job
|
pub fn create_job(&mut self, key: String) -> &Job
|
||||||
{
|
{
|
||||||
let id = self.jobs.len() as u32;
|
let id = self.jobs.len() as u32;
|
||||||
|
Loading…
Reference in New Issue
Block a user