From c6102a55af0ac3653c3b05e0c8c9969d3c7cfda7 Mon Sep 17 00:00:00 2001 From: MoonGem <34537029+MoonGem@users.noreply.github.com> Date: Fri, 23 Mar 2018 18:30:08 -0500 Subject: [PATCH] Update start-hyperopt-worker.py --- scripts/start-hyperopt-worker.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/start-hyperopt-worker.py b/scripts/start-hyperopt-worker.py index a24ce1780..db80ec8de 100755 --- a/scripts/start-hyperopt-worker.py +++ b/scripts/start-hyperopt-worker.py @@ -2,7 +2,8 @@ import multiprocessing import os import subprocess - +import sys +import shlex PROC_COUNT = multiprocessing.cpu_count() - 1 DB_NAME = 'freqtrade_hyperopt' WORK_DIR = os.path.join( @@ -22,8 +23,6 @@ command = [ '--max-jobs=100000', '--max-consecutive-failures=100000', ] -processes = [subprocess.Popen(command) for i in range(PROC_COUNT)] - -# Join all workers -for proc in processes: - proc.wait() +def run(command): + subprocess.call(command, shell=True)) +run(command)