Update generator.py
This commit is contained in:
parent
9034a8e090
commit
9f86cf0cdf
@ -37,7 +37,7 @@ def backtesting(ind):
|
|||||||
|
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
ncpus = int(sys.argv[1])
|
ncpus = int(sys.argv[1])
|
||||||
# Creates jobserver with ncpus workers restart=True is not needed
|
# Creates jobserver with ncpus workers
|
||||||
job_server = pp.Server(ncpus, ppservers=ppservers)
|
job_server = pp.Server(ncpus, ppservers=ppservers)
|
||||||
else:
|
else:
|
||||||
# Creates jobserver with automatically detected number of workers
|
# Creates jobserver with automatically detected number of workers
|
||||||
@ -55,6 +55,7 @@ while True:
|
|||||||
for job in jobs:
|
for job in jobs:
|
||||||
try:
|
try:
|
||||||
res = job()
|
res = job()
|
||||||
|
if res is not None:
|
||||||
string = str(res)
|
string = str(res)
|
||||||
params = re.search(r'~~~~(.*)~~~~', string).group(1)
|
params = re.search(r'~~~~(.*)~~~~', string).group(1)
|
||||||
mfi = re.search(r'MFI Value(.*)XXX', string)
|
mfi = re.search(r'MFI Value(.*)XXX', string)
|
||||||
@ -86,6 +87,7 @@ while True:
|
|||||||
print(rsi.group(1))
|
print(rsi.group(1))
|
||||||
except exception as e:
|
except exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
pass
|
||||||
|
|
||||||
print("Time elapsed: ", time.time() - start_time, "s")
|
print("Time elapsed: ", time.time() - start_time, "s")
|
||||||
job_server.print_stats()
|
job_server.print_stats()
|
||||||
|
Loading…
Reference in New Issue
Block a user