Update generator.py
This commit is contained in:
parent
178b40a745
commit
506b11162d
@ -11,8 +11,8 @@ ppservers = ()
|
|||||||
# ppservers = ("10.0.0.1",)
|
# ppservers = ("10.0.0.1",)
|
||||||
|
|
||||||
# Number of jobs to run
|
# Number of jobs to run
|
||||||
parts = 1000000
|
work = 32
|
||||||
|
cycles = 100
|
||||||
|
|
||||||
jobs = []
|
jobs = []
|
||||||
current = 0
|
current = 0
|
||||||
@ -50,14 +50,15 @@ print("Starting pp with", job_server.get_ncpus(), "workers")
|
|||||||
|
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
index = 1
|
index = 1
|
||||||
|
indey = 1
|
||||||
print('Please wait... sending jobs to server')
|
print('Please wait... sending jobs to server')
|
||||||
while parts > index:
|
while cycles > index:
|
||||||
|
cycles += 1
|
||||||
|
while work > indey:
|
||||||
jobs.append(job_server.submit(backtesting, (index,)))
|
jobs.append(job_server.submit(backtesting, (index,)))
|
||||||
index += 1
|
indey += 1
|
||||||
while True:
|
job_server.wait()
|
||||||
print('Searching... in loop... waiting 15s')
|
print('Searching this cycle....')
|
||||||
time.sleep(15)
|
|
||||||
for job in jobs:
|
for job in jobs:
|
||||||
try:
|
try:
|
||||||
res = job()
|
res = job()
|
||||||
@ -94,3 +95,8 @@ while True:
|
|||||||
job_server.print_stats()
|
job_server.print_stats()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
jobs = []
|
||||||
|
indey = 1
|
||||||
|
print('DONE')
|
||||||
|
print("Time elapsed: ", time.time() - start_time, "s")
|
||||||
|
job_server.print_stats()
|
||||||
|
Loading…
Reference in New Issue
Block a user