From 4f0eb2b11ac44ce4f3b2273dcd863c5e173689c1 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 4 Dec 2020 10:23:27 +0100 Subject: Remove passing of additional env variables This patch removes the passing around of additional environment variables that were specified on the commandline and adds them directly to the Job object instance upon creation. This does not result in a netto-loss of code, but in a netto-loss of complexity. For this to be possible, we had to derive Clone for `JobResource`, which we have to clone when creating the `Job` objects during the creation of the jobsets from the `Tree` object. Signed-off-by: Matthias Beyer --- src/orchestrator/orchestrator.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/orchestrator') diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index 3d98ee5..c6bcc77 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -40,7 +40,6 @@ pub struct OrchestratorSetup<'a> { staging_store: Arc>, release_store: Arc>, source_cache: SourceCache, - additional_env: Vec<(String, String)>, jobsets: Vec, database: PgConnection, submit: Submit, @@ -51,7 +50,7 @@ pub struct OrchestratorSetup<'a> { impl<'a> OrchestratorSetup<'a> { pub async fn setup(self) -> Result> { let db = Arc::new(self.database); - let scheduler = EndpointScheduler::setup(self.endpoint_config, self.staging_store.clone(), db, self.progress_generator, self.submit.clone(), self.log_dir, self.additional_env).await?; + let scheduler = EndpointScheduler::setup(self.endpoint_config, self.staging_store.clone(), db, self.progress_generator, self.submit.clone(), self.log_dir).await?; Ok(Orchestrator { scheduler: scheduler, -- cgit v1.2.3