We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6e9e8a commit fb52e0cCopy full SHA for fb52e0c
src/utils.js
@@ -9,17 +9,14 @@ const debugVerbose = require('debug')('netlify-plugin-cypress:verbose')
9
*/
10
const ping = (url, timeout) => {
11
debug('pinging "%s" for %d ms max', url, timeout)
12
- const start = +new Date()
13
return got(url, {
14
retry: {
15
- retries(retry, error) {
16
- const now = +new Date()
17
- debugVerbose(
18
- `${now - start}ms ${error.method} ${error.host} ${
19
- error.code
20
- }`
21
- )
22
- if (now - start > timeout) {
+ limit: 30,
+ calculateDelay({attemptCount, retryOptions, error, computedValue}) {
+ debugVerbose(`attempt ${attemptCount} ${computedValue}ms ${error.message}`)
+
+ if (computedValue > timeout) {
+ debug('%s timed out', url)
23
console.error('%s timed out', url)
24
return 0
25
}
0 commit comments