From 5fda8cfc730286bef0004d6cc05803d188153b7e Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 7 Jul 2021 09:02:50 +0800 Subject: [PATCH] fix issue --- spug_api/apps/deploy/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spug_api/apps/deploy/utils.py b/spug_api/apps/deploy/utils.py index 163cf30..f8c5eb6 100644 --- a/spug_api/apps/deploy/utils.py +++ b/spug_api/apps/deploy/utils.py @@ -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) @@ -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)