mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
Use Pool as a context manager
This commit is contained in:
parent
432a32cecb
commit
08e1ef6d13
1 changed files with 1 additions and 2 deletions
|
|
@ -127,13 +127,12 @@ def main():
|
|||
targets.remove('DNS_PLUGINS')
|
||||
targets.update(PLUGINS)
|
||||
|
||||
with Manager() as manager:
|
||||
with Manager() as manager, Pool(processes=len(targets)) as pool:
|
||||
status = manager.dict()
|
||||
|
||||
state_process = Process(target=_dump_status, args=(archs, status,))
|
||||
state_process.start()
|
||||
|
||||
pool = Pool(processes=len(targets))
|
||||
async_results = [pool.apply_async(_build_snap, (target, archs, status)) for target in targets]
|
||||
|
||||
workspaces = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue