diff --git a/src/engine/service/runner/backend/generic.rs b/src/engine/service/runner/backend/generic.rs index 98d9a37..b0ae392 100644 --- a/src/engine/service/runner/backend/generic.rs +++ b/src/engine/service/runner/backend/generic.rs @@ -7,15 +7,18 @@ use futures::FutureExt; use nonempty::NonEmpty; use tokio::sync::oneshot::Sender; -use crate::engine::{ - service::runner::backend::backend_config::substitute_placeholders, task::resources, Task, -}; +use crate::engine::{service::runner::backend::backend_config::substitute_placeholders, Task}; use super::{ backend_config::{BackendConfig, BackendType}, Backend, ExecutionResult, Reply, }; +/// cwd parameter name for lsf +const CWD: &str = "cwd"; +/// memory parameter name for lsf +const MEMORY: &str = "memory"; + /// A generic backend #[derive(Debug)] pub struct GenericBackend { @@ -111,13 +114,13 @@ impl Backend for GenericRunner { }; if let Some(cwd) = exec.workdir() { - substitutions.insert("cwd".to_string(), cwd.to_string()); + substitutions.insert(CWD.to_string(), cwd.to_string()); } if let Some(resources) = task.resources() { if let Some(gb) = resources.ram_gb() { substitutions - .insert("mem".to_string(), ((gb * 1000f64) as usize).to_string()); + .insert(MEMORY.to_string(), ((gb * 1000f64) as usize).to_string()); } }