precommit: Increase timeout and reduce num_workers

This commit is contained in:
Ole Schütt 2020-08-25 13:26:48 +02:00 committed by Ole Schütt
parent 1ad933c00c
commit dc98efcbef
2 changed files with 3 additions and 3 deletions

View file

@ -22,7 +22,7 @@ else
git --no-pager log -1 --pretty='%nCommitSHA: %H%nCommitTime: %ci%nCommitAuthor: %an%nCommitSubject: %s%n'
echo -e "\n========== Running Precommit Checks =========="
export CP2K_PRECOMMIT_SERVER="http://127.0.0.1:8080"
./tools/precommit/precommit.py --no-cache --progressbar-wait=10 || true
./tools/precommit/precommit.py --no-cache --progressbar-wait=10 -j 4 || true
fi
#EOF

View file

@ -47,7 +47,7 @@ def main():
"-j",
"--num_workers",
type=int,
default=min(32, os.cpu_count() + 4), # copied from ThreadPoolExecutor
default=min(16, os.cpu_count() + 2),
help="number of parallel workers",
)
parser.add_argument(
@ -235,7 +235,7 @@ def run_analyze_src(fn):
# ======================================================================================
def run_local_tool(*cmd, timeout=10):
def run_local_tool(*cmd, timeout=20):
p = subprocess.run(cmd, timeout=timeout, stdout=PIPE, stderr=STDOUT)
if p.returncode != 0:
raise Exception(p.stdout.decode("utf8"))