Add autocommit support with inotify
This commit is contained in:
@@ -8,11 +8,13 @@ use std::io::{self, copy, Read};
|
||||
use std::path::Path;
|
||||
use yaml_rust::{YamlLoader, YamlEmitter};
|
||||
|
||||
use std::{thread, time};
|
||||
|
||||
fn main()
|
||||
{
|
||||
pretty_env_logger::init();
|
||||
|
||||
let benchmark_repository = BenchmarkRepository::new("git@git.luehne.de:patrick/tplp-planning-benchmark.git", Path::new("storage"), "git", "Potassco Bot", "bot@potassco.org");
|
||||
let mut benchmark_repository = BenchmarkRepository::new("git@git.luehne.de:patrick/tplp-planning-benchmark.git", Path::new("storage"), "git", "Potassco Bot", "bot@potassco.org");
|
||||
|
||||
/*let files = vec!
|
||||
[
|
||||
@@ -40,15 +42,25 @@ fn main()
|
||||
let instance_domain = instance["domain"].as_str().unwrap();
|
||||
let instance_number = instance["instance"].as_i64().unwrap();
|
||||
|
||||
let file_name = format!("{}/{}/{}", instance_ipc, instance_domain, instance_number);
|
||||
let file_name_base = format!("{}/{}/{}/{}", configuration_id, instance_ipc, instance_domain, instance_number);
|
||||
let file_name_output = format!("{}.out", file_name_base);
|
||||
|
||||
if (benchmark_repository.file_exists(Path::new(&file_name), "test-results"))
|
||||
if (benchmark_repository.file_exists(Path::new(&file_name_output), "test-results"))
|
||||
{
|
||||
println!("done: [{}, {}, {}/{}/{}]", configuration_id, instance_set_id, instance_ipc, instance_domain, instance_number);
|
||||
continue;
|
||||
}
|
||||
|
||||
println!("to do: [{}, {}, {}/{}/{}]", configuration_id, instance_set_id, instance_ipc, instance_domain, instance_number);
|
||||
let test = benchmark_repository.create_autocommit_directory(Path::new(&file_name_base), "test-results").unwrap();
|
||||
//println!("{}", test.display());
|
||||
|
||||
//println!("to do: [{}, {}, {}/{}/{}]", configuration_id, instance_set_id, instance_ipc, instance_domain, instance_number);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let duration = time::Duration::from_secs(20);
|
||||
thread::sleep(duration);
|
||||
|
||||
benchmark_repository.wait_for_autocommit_thread();
|
||||
}
|
||||
|
Reference in New Issue
Block a user