Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
running_job_paths.append(job['client'].path)
logger.debug("started '%s'" % job['client'].path)
job_queue.put(job)
logger.debug('ongoing %s' % running_job_paths)
# start all workers
[w.start() for w in workers]
# collect results
while len(results) < len(jobs):
(job, result) = result_queue.get()
logger.debug("finished '%s'" % job['client'].path)
running_job_paths.remove(result['job']['client'].path)
if show_progress and len(jobs) > 1:
if result['returncode'] == NotImplemented:
stdout.write('s')
elif result['returncode']:
stdout.write('E')
else:
stdout.write('.')
if debug_jobs:
stdout.write('\n')
stdout.flush()
result.update(job)
results.append(result)
if pending_jobs:
for pending_job in pending_jobs:
pending_job.get('depends', set()).discard(job['client'].path)
while job_queue.qsize() < len(workers):
job = get_ready_job(pending_jobs)
if not job:
break
# start all workers
[w.start() for w in workers]
# collect results
while len(results) < len(jobs):
(job, result) = result_queue.get()
logger.debug("finished '%s'" % job['client'].path)
running_job_paths.remove(result['job']['client'].path)
if show_progress and len(jobs) > 1:
if result['returncode'] == NotImplemented:
stdout.write('s')
elif result['returncode']:
stdout.write('E')
else:
stdout.write('.')
if debug_jobs:
stdout.write('\n')
stdout.flush()
result.update(job)
results.append(result)
if pending_jobs:
for pending_job in pending_jobs:
pending_job.get('depends', set()).discard(job['client'].path)
while job_queue.qsize() < len(workers):
job = get_ready_job(pending_jobs)
if not job:
break
running_job_paths.append(job['client'].path)
logger.debug("started '%s'" % job['client'].path)
job_queue.put(job)
assert running_job_paths
job_queue.put(job)
logger.debug('ongoing %s' % running_job_paths)
# start all workers
[w.start() for w in workers]
# collect results
while len(results) < len(jobs):
(job, result) = result_queue.get()
logger.debug("finished '%s'" % job['client'].path)
running_job_paths.remove(result['job']['client'].path)
if show_progress and len(jobs) > 1:
if result['returncode'] == NotImplemented:
stdout.write('s')
elif result['returncode']:
stdout.write('E')
else:
stdout.write('.')
if debug_jobs:
stdout.write('\n')
stdout.flush()
result.update(job)
results.append(result)
if pending_jobs:
for pending_job in pending_jobs:
pending_job.get('depends', set()).discard(job['client'].path)
while job_queue.qsize() < len(workers):
job = get_ready_job(pending_jobs)
if not job:
break
running_job_paths.append(job['client'].path)
logger.debug("started '%s'" % job['client'].path)
[w.start() for w in workers]
# collect results
while len(results) < len(jobs):
(job, result) = result_queue.get()
logger.debug("finished '%s'" % job['client'].path)
running_job_paths.remove(result['job']['client'].path)
if show_progress and len(jobs) > 1:
if result['returncode'] == NotImplemented:
stdout.write('s')
elif result['returncode']:
stdout.write('E')
else:
stdout.write('.')
if debug_jobs:
stdout.write('\n')
stdout.flush()
result.update(job)
results.append(result)
if pending_jobs:
for pending_job in pending_jobs:
pending_job.get('depends', set()).discard(job['client'].path)
while job_queue.qsize() < len(workers):
job = get_ready_job(pending_jobs)
if not job:
break
running_job_paths.append(job['client'].path)
logger.debug("started '%s'" % job['client'].path)
job_queue.put(job)
assert running_job_paths
if running_job_paths:
logger.debug('ongoing ' + str(running_job_paths))