trouble-in-terror-town/node_modules/another-npm-registry-client/lib/attempt.js
Mikolaj 2bbacbea09 did some more work on networking and removed EOS in favor of LRM
did some more work on networking and removed EOS in favor of Light Reflective Mirror
2022-05-31 15:04:31 +02:00

20 lines
487 B
JavaScript

var retry = require('retry')
module.exports = attempt
function attempt (cb) {
// Tuned to spread 3 attempts over about a minute.
// See formula at <https://github.com/tim-kos/node-retry>.
var operation = retry.operation(this.config.retry)
var client = this
operation.attempt(function (currentAttempt) {
client.log.info(
'attempt',
'registry request try #' + currentAttempt +
' at ' + (new Date()).toLocaleTimeString()
)
cb(operation)
})
}