Update start-hyperopt-worker.py
This commit is contained in:
parent
a9ee8783d7
commit
c6102a55af
@ -2,7 +2,8 @@
|
|||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import shlex
|
||||||
PROC_COUNT = multiprocessing.cpu_count() - 1
|
PROC_COUNT = multiprocessing.cpu_count() - 1
|
||||||
DB_NAME = 'freqtrade_hyperopt'
|
DB_NAME = 'freqtrade_hyperopt'
|
||||||
WORK_DIR = os.path.join(
|
WORK_DIR = os.path.join(
|
||||||
@ -22,8 +23,6 @@ command = [
|
|||||||
'--max-jobs=100000',
|
'--max-jobs=100000',
|
||||||
'--max-consecutive-failures=100000',
|
'--max-consecutive-failures=100000',
|
||||||
]
|
]
|
||||||
processes = [subprocess.Popen(command) for i in range(PROC_COUNT)]
|
def run(command):
|
||||||
|
subprocess.call(command, shell=True))
|
||||||
# Join all workers
|
run(command)
|
||||||
for proc in processes:
|
|
||||||
proc.wait()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user