diff --git a/ofborg/src/bin/mass-rebuilder.rs b/ofborg/src/bin/mass-rebuilder.rs index 5d118c3..d35775b 100644 --- a/ofborg/src/bin/mass-rebuilder.rs +++ b/ofborg/src/bin/mass-rebuilder.rs @@ -35,7 +35,8 @@ fn main() -> Result<(), Box> { let conn = easylapin::from_config(&cfg.rabbitmq)?; let mut chan = task::block_on(conn.create_channel())?; - let cloner = checkout::cached_cloner(Path::new(&cfg.checkout.root)); + let root = Path::new(&cfg.checkout.root); + let cloner = checkout::cached_cloner(&root.join(cfg.runner.instance.to_string())); let nix = cfg.nix(); let events = stats::RabbitMq::from_lapin(&cfg.whoami(), task::block_on(conn.create_channel())?); diff --git a/ofborg/src/config.rs b/ofborg/src/config.rs index c095cfe..dba6806 100644 --- a/ofborg/src/config.rs +++ b/ofborg/src/config.rs @@ -64,8 +64,14 @@ pub struct LogStorage { pub path: String, } +const fn default_instance() -> u8 { + 1 +} + #[derive(Serialize, Deserialize, Debug)] pub struct RunnerConfig { + #[serde(default = "default_instance")] + pub instance: u8, pub identity: String, pub repos: Option>, #[serde(default = "Default::default")]