Support multiple evaluators on a single machine

This commit is contained in:
Cole Helbling 2024-01-26 14:49:49 -08:00
parent 7db074df7b
commit bd6b7f8846
2 changed files with 8 additions and 1 deletions

View file

@ -35,7 +35,8 @@ fn main() -> Result<(), Box<dyn Error>> {
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())?);

View file

@ -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<Vec<String>>,
#[serde(default = "Default::default")]