Skip to content

Commit

Permalink
re-assigning worker_extra_args instead of altering it with += (#591)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jolange committed Oct 3, 2022
1 parent f79f913 commit a6be519
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dask_jobqueue/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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
Expand Down

0 comments on commit a6be519

Please sign in to comment.