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

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 Andrey Lushnikov
parent bc33eb3d33
commit 745bbbec99

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) => {