You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
487 B

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)
})
}