Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed Jul 7, 2021
1 parent 1a24fac commit 5fda8cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spug_api/apps/deploy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _ext1_deploy(req, helper, env):
helper.local(f'cd {REPOS_DIR} && tar zcf {env.SPUG_VERSION}.tar.gz {exclude} {contain}')
helper.send_step('local', 6, f'完成')
threads, latest_exception = [], None
with futures.ThreadPoolExecutor(max_workers=min(10, os.cpu_count() + 5)) as executor:
with futures.ThreadPoolExecutor(max_workers=max(10, os.cpu_count() + 5)) as executor:
for h_id in json.loads(req.host_ids):
env = AttrDict(env.items())
t = executor.submit(_deploy_ext1_host, helper, h_id, extend, env)
Expand Down Expand Up @@ -168,7 +168,7 @@ def _ext2_deploy(req, helper, env):
break
if host_actions:
threads, latest_exception = [], None
with futures.ThreadPoolExecutor(max_workers=min(10, os.cpu_count() + 5)) as executor:
with futures.ThreadPoolExecutor(max_workers=max(10, os.cpu_count() + 5)) as executor:
for h_id in json.loads(req.host_ids):
env = AttrDict(env.items())
t = executor.submit(_deploy_ext2_host, helper, h_id, host_actions, env)
Expand Down

0 comments on commit 5fda8cf

Please sign in to comment.