Update random.py

This commit is contained in:
MoonGem 2018-03-25 11:11:21 -05:00 committed by GitHub
parent 2ea1fd141c
commit 4e8ed34d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,7 @@ WORK_DIR = os.path.join(
# Spawn workers # Spawn workers
command = [ command = [
'python3.6', 'python3.6',
'-u',
WORK_DIR, WORK_DIR,
'backtesting', 'backtesting',
] ]
@ -31,7 +32,7 @@ while True:
while procs < 32: while procs < 32:
try: try:
procs + 1 procs + 1
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=1, universal_newlines=True)
data = proc.communicate() data = proc.communicate()
string = str(data) string = str(data)
params = re.search(r'~~~~(.*)~~~~', string).group(1) params = re.search(r'~~~~(.*)~~~~', string).group(1)