blob: 7f289efeb866c3c10b5c050eb2446272e514c839 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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)
})
}
|