Implement concurrent execution of individual hooks

This commit is contained in:
Chris Kuehl
2018-10-20 13:05:55 -07:00
committed by Chris Kuehl
parent 1f1cd2bc39
commit ba5e27e4ec
15 changed files with 104 additions and 14 deletions

View File

@@ -127,7 +127,11 @@ def py_interface(_dir, _make_venv):
def run_hook(prefix, hook, file_args):
with in_env(prefix, hook['language_version']):
return xargs(helpers.to_cmd(hook), file_args)
return xargs(
helpers.to_cmd(hook),
file_args,
target_concurrency=helpers.target_concurrency(hook),
)
def install_environment(prefix, version, additional_dependencies):
additional_dependencies = tuple(additional_dependencies)