From 6eae5a48378f150ee8325d8ce22561874178c957 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 14 Oct 2020 18:29:02 +0200 Subject: Add speed and max number of jobs endpoint settings Signed-off-by: Matthias Beyer --- src/config/mod.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/config') diff --git a/src/config/mod.rs b/src/config/mod.rs index 40a48b5..3c48023 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -4,6 +4,7 @@ use std::ops::Deref; use anyhow::Result; use getset::Getters; +use getset::CopyGetters; use serde::Deserialize; use crate::phase::PhaseName; @@ -60,7 +61,7 @@ pub struct ContainerConfig { } -#[derive(Debug, Getters, Deserialize)] +#[derive(Debug, Getters, CopyGetters, Deserialize)] pub struct Endpoint { #[getset(get = "pub")] name: String, @@ -70,6 +71,18 @@ pub struct Endpoint { #[getset(get = "pub")] endpoint_type: EndpointType, + + /// Relative speed to other endpoints + /// + /// So if you have two servers, one with 12 cores and one with 24, you want to set "1" for the + /// first and "2" for the second (or "12" for the first and "24" for the second - the ratio is + /// the thing here)! + #[getset(get_copy = "pub")] + speed: usize, + + /// Maximum number of jobs which are allowed on this endpoint + #[getset(get_copy = "pub")] + maxjobs: usize, } #[derive(Debug, Deserialize, Eq, PartialEq)] -- cgit v1.2.3