Skip to content

Commit

Permalink
Xpk fix parallel node pool create (#27)
Browse files Browse the repository at this point in the history
* Add support for ondemand/spot/reservation for cluster

* Add readme details on how to create a cluster

* Fix parallel node pool creation
  • Loading branch information
Obliviour authored Nov 22, 2023
1 parent dd10f07 commit 933c8a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xpk.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,12 @@ def run_command_batch(commands, jobname, per_command_name, output_logs):
children = []
start_time = datetime.datetime.now()
for i, command in enumerate(commands):
with subprocess.Popen(
command, stdout=output_logs[i], stderr=output_logs[i], shell=True
) as task:
children.append(task)
children.append(
# subprocess managed by list pylint: disable=consider-using-with
subprocess.Popen(
command, stdout=output_logs[i], stderr=output_logs[i], shell=True
)
)

while True:
returncodes = [child.poll() for child in children]
Expand Down

0 comments on commit 933c8a0

Please sign in to comment.