Skip to content

Commit

Permalink
fix: make num_procs empty for run_worker
Browse files Browse the repository at this point in the history
  • Loading branch information
dodamih committed Nov 9, 2023
1 parent cf5b2f1 commit a330deb
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,21 @@ def get_mazepa_worker_command(
):
if num_procs == 1 and semaphores_spec is None:
command = "mazepa.run_worker"
else:
command = "mazepa.run_worker_manager"
if semaphores_spec is None:
num_procs_line = ""
semaphores_line = ""
else:
command = "mazepa.run_worker_manager"
num_procs_line = f"num_procs: {num_procs}\n"
semaphores_line = f"semaphores_spec: {json.dumps(semaphores_spec)}\n"

result = (
"""
zetta -vv -l try run -s '{
"""
+ f'"@type": "{command}"\n'
+ f"task_queue: {json.dumps(task_queue_spec)}\n"
+ f"outcome_queue: {json.dumps(outcome_queue_spec)}\n"
+ f"num_procs: {num_procs}\n"
+ num_procs_line
+ semaphores_line
+ """
sleep_sec: 5
Expand Down

0 comments on commit a330deb

Please sign in to comment.