Skip to content

Commit 239a32f

Browse files
committed
Update use of parallel in parallel extension installation
Migrate from `self.cfg['parallel']` to `self.cfg.parallel`
1 parent 45acfe8 commit 239a32f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

easybuild/framework/easyblock.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ def skip_extensions_parallel(self, exts_filter):
18211821
exts_cnt = len(self.ext_instances)
18221822
cmds = [resolve_exts_filter_template(exts_filter, ext) for ext in self.ext_instances]
18231823

1824-
with ThreadPoolExecutor(max_workers=self.cfg['parallel']) as thread_pool:
1824+
with ThreadPoolExecutor(max_workers=self.cfg.parallel) as thread_pool:
18251825

18261826
# list of command to run asynchronously
18271827
async_cmds = [thread_pool.submit(run_shell_cmd, cmd, stdin=stdin, hidden=True, fail_on_error=False,
@@ -1953,7 +1953,7 @@ def install_extensions_parallel(self, install=True):
19531953
"""
19541954
self.log.info("Installing extensions in parallel...")
19551955

1956-
thread_pool = ThreadPoolExecutor(max_workers=self.cfg['parallel'])
1956+
thread_pool = ThreadPoolExecutor(max_workers=self.cfg.parallel)
19571957

19581958
running_exts = []
19591959
installed_ext_names = []
@@ -2015,7 +2015,7 @@ def update_exts_progress_bar_helper(running_exts, progress_size):
20152015

20162016
for _ in range(max_iter):
20172017

2018-
if not (exts_queue and len(running_exts) < self.cfg['parallel']):
2018+
if not (exts_queue and len(running_exts) < self.cfg.parallel):
20192019
break
20202020

20212021
# check whether extension at top of the queue is ready to install

0 commit comments

Comments
 (0)