refactor(ngcc): change async locker timeout to 250 secs (#36979)

Previously the `AsyncLocker` was configured to only wait
50x500ms before timing out. This is 25secs, which is often
less than a normal run of ngcc, so the chance of a timeout
flake was quite high.

The timeout is now 500x500ms, which is 250secs.

PR Close #36979
This commit is contained in:
Gabriel Schuster
2020-05-07 14:15:13 +02:00
committed by Misko Hevery
parent f0ce3c2ce5
commit ad3fbe1ea0

View File

@ -155,7 +155,7 @@ function getExecutor(
const lockFile = new LockFileWithChildProcess(fileSystem, logger); const lockFile = new LockFileWithChildProcess(fileSystem, logger);
if (async) { if (async) {
// Execute asynchronously (either serially or in parallel) // Execute asynchronously (either serially or in parallel)
const locker = new AsyncLocker(lockFile, logger, 500, 50); const locker = new AsyncLocker(lockFile, logger, 500, 500);
if (inParallel) { if (inParallel) {
// Execute in parallel. Use up to 8 CPU cores for workers, always reserving one for master. // Execute in parallel. Use up to 8 CPU cores for workers, always reserving one for master.
const workerCount = Math.min(8, os.cpus().length - 1); const workerCount = Math.min(8, os.cpus().length - 1);