creating processes for the generators
This commit is contained in:
parent
8c5193cb6d
commit
57e32261c6
14
pipeline.py
14
pipeline.py
|
@ -280,11 +280,21 @@ if __name__ == '__main__' :
|
||||||
if ''.join(content).isnumeric() :
|
if ''.join(content).isnumeric() :
|
||||||
#
|
#
|
||||||
# we have partitions we are working with
|
# we have partitions we are working with
|
||||||
|
make = lambda args: (Components()).generate(args)
|
||||||
|
jobs = []
|
||||||
|
print (["Started ",len(jobs),"generators"])
|
||||||
for id in ''.join(content) :
|
for id in ''.join(content) :
|
||||||
args['partition'] = id
|
args['partition'] = id
|
||||||
|
job = Process(target=make,args=(args,args))
|
||||||
|
|
||||||
generator.generate(args)
|
job.start()
|
||||||
|
jobs.append(job)
|
||||||
|
|
||||||
|
while (len(jobs)> 0) :
|
||||||
|
jobs = [jobs for job in jobs if job.is_alive()]
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
# generator.generate(args)
|
||||||
else:
|
else:
|
||||||
generator.generate(args)
|
generator.generate(args)
|
||||||
# Components.generate(args)
|
# Components.generate(args)
|
||||||
|
|
Loading…
Reference in New Issue