Code clean-up
This commit is contained in:
parent
77ea47f32b
commit
b63db679c1
@ -1,14 +1,11 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os
|
import os
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
from itertools import zip_longest
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
PROC_COUNT = multiprocessing.cpu_count() - 1
|
PROC_COUNT = multiprocessing.cpu_count() - 1
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
print(cwd)
|
print(cwd)
|
||||||
global procs
|
|
||||||
limit = 24
|
|
||||||
WORK_DIR = os.path.join(
|
WORK_DIR = os.path.join(
|
||||||
os.path.sep,
|
os.path.sep,
|
||||||
os.path.abspath(os.path.dirname(__file__)),
|
os.path.abspath(os.path.dirname(__file__)),
|
||||||
@ -22,12 +19,13 @@ command = [
|
|||||||
'backtesting',
|
'backtesting',
|
||||||
]
|
]
|
||||||
global current
|
global current
|
||||||
|
global procs
|
||||||
current = 0
|
current = 0
|
||||||
procs = 0
|
procs = 0
|
||||||
DEVNULL = open(os.devnull, 'wb')
|
DEVNULL = open(os.devnull, 'wb')
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
while procs < 32:
|
while procs < PROC_COUNT:
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user