From 19c78e89366a590e85503f81ed4ac27ef01c441d Mon Sep 17 00:00:00 2001 From: Johannes Lange Date: Mon, 3 Oct 2022 14:13:20 +0200 Subject: [PATCH] re-assigning `worker_extra_args` instead of altering it with `+=` Because `worker_extra_args` is assigned to a config value. With `+=` the config value is changed every time, so the args will be appended again for each job resulting in #589. It's a regression from #576. Fixes #589 --- dask_jobqueue/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dask_jobqueue/core.py b/dask_jobqueue/core.py index 0ed3dc58..01c1756d 100644 --- a/dask_jobqueue/core.py +++ b/dask_jobqueue/core.py @@ -306,9 +306,9 @@ def __init__( self.job_header = None if interface: - worker_extra_args += ["--interface", interface] + worker_extra_args = worker_extra_args + ["--interface", interface] if protocol: - worker_extra_args += ["--protocol", protocol] + worker_extra_args = worker_extra_args + ["--protocol", protocol] if security: worker_security_dict = security.get_tls_config_for_role("worker") security_command_line_list = [ @@ -318,7 +318,7 @@ def __init__( if key != "ciphers" ] security_command_line = sum(security_command_line_list, []) - worker_extra_args += security_command_line + worker_extra_args = worker_extra_args + security_command_line # Keep information on process, cores, and memory, for use in subclasses self.worker_memory = parse_bytes(memory) if memory is not None else None