fix: fix proper-lock-file configuration (#10356)

Turns out we were using wrong formula; with the config we had in place,
proper-lock-file would give up to aquire lock after 49 seconds of
waiting.

With the proper configuration, we'll keep re-trying for 10 minutes.

Fixes #10354
This commit is contained in:
Andrey Lushnikov 2021-11-16 13:49:01 -08:00 committed by GitHub
parent 4747b6e880
commit 82002b2803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -550,10 +550,10 @@ export class Registry {
try {
releaseLock = await lockfile.lock(registryDirectory, {
retries: {
retries: 10,
// Retry 20 times during 10 minutes with
// exponential back-off.
// See documentation at: https://www.npmjs.com/package/retry#retrytimeoutsoptions
retries: 20,
factor: 1.27579,
},
onCompromised: (err: Error) => {