amp-api
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -189,7 +189,6 @@ 'use strict'; | ||
const urlSets = chunk(data.urls, 50); | ||
const requestSets = chunk(urlSets, 10); | ||
this.log.info( | ||
`${ | ||
requestSets.length | ||
urlSets.length | ||
} sets of 50 urls. Each wil be executed with a 10 second delay to avoid rate limits.` | ||
@@ -199,3 +198,3 @@ ); | ||
return P.map( | ||
requestSets, | ||
urlSets, | ||
urlSet => | ||
@@ -213,2 +212,9 @@ request | ||
}) | ||
.then(res => { | ||
if (res.statusCode !== 200) { | ||
this.log.error('Failed batch api call.'); | ||
this.log.error(res.body); | ||
} | ||
return res; | ||
}) | ||
.delay(10000), | ||
@@ -215,0 +221,0 @@ { concurrency: 1 } |
{ | ||
"name": "amp-api", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Warm/Bust/Validate Amp Cache", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
262007
8026