From c9d007ba1f738605457e506a8889eaee6d55702c Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Fri, 8 Dec 2023 21:30:03 +0100 Subject: [PATCH] fix envvar handling --- snakemake_executor_plugin_azure_batch/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snakemake_executor_plugin_azure_batch/__init__.py b/snakemake_executor_plugin_azure_batch/__init__.py index d2f85e4..89efffb 100644 --- a/snakemake_executor_plugin_azure_batch/__init__.py +++ b/snakemake_executor_plugin_azure_batch/__init__.py @@ -261,7 +261,7 @@ def __post_init__(self): self.pool_id = f"snakepool-{ts:s}" self.job_id = f"snakejob-{ts:s}" - self.envvars = list(self.workflow.envvars) or [] + self.envvars = self.workflow.spawned_job_args_factory.envvars() # enable autoscale flag self.az_batch_enable_autoscale = self.settings.autoscale @@ -328,10 +328,10 @@ def run_job(self, job: JobExecutorInterface): # with job_info being of type # snakemake_interface_executor_plugins.executors.base.SubmittedJobInfo. envsettings = [] - for key in self.envvars: + for key, value in self.envvars.items(): try: envsettings.append( - batchmodels.EnvironmentSetting(name=key, value=os.environ[key]) + batchmodels.EnvironmentSetting(name=key, value=value) ) except KeyError: continue