Browse Source

Reduce the number of retries on cert creation (#664)

Retrying multiple times on cert creation doesn't usually help but
makes the user wait for a longer time for nothing. Usually there
is either a configuration error that must be solved or the DNS
change hasn't propagated yet, which will usually take longer than
the retry window.
master
Olli Vanhoja 8 years ago
committed by Leo Lamprecht
parent
commit
5080520616
  1. 9
      lib/index.js

9
lib/index.js

@ -756,12 +756,13 @@ module.exports = class Now extends EventEmitter {
}
return body
},
{ retries: 5, minTimeout: 30000, maxTimeout: 90000 }
{ retries: 3, minTimeout: 30000, maxTimeout: 90000 }
)
}
deleteCert(domain) {
return this.retry(async (bail, attempt) => {
return this.retry(
async (bail, attempt) => {
if (this._debug) {
console.time(`> [debug] /now/certs #${attempt}`)
}
@ -780,7 +781,9 @@ module.exports = class Now extends EventEmitter {
throw err
}
})
},
{ retries: 3 }
)
}
async remove(deploymentId, { hard }) {

Loading…
Cancel
Save