Exclude timed out links from logs

This commit is contained in:
freearhey committed 2020-05-27 20:14:06 +03:00
1 parent c743ec55bb
commit 02e8a02037
1 file changed
+2 -2
+2 -2
View File
@@ -7,7 +7,7 @@ const config = {
debug: process.env.npm_config_debug || false, debug: process.env.npm_config_debug || false,
country: process.env.npm_config_country, country: process.env.npm_config_country,
exclude: process.env.npm_config_exclude, exclude: process.env.npm_config_exclude,
timeout: 60000 timeout: 10000
} }
let stats = { let stats = {
@@ -33,7 +33,7 @@ async function test() {
omitMetadata: true, omitMetadata: true,
parallel: 1, parallel: 1,
itemCallback: item => { itemCallback: item => {
if (!item.status.ok) { if (!item.status.ok && item.status.reason !== 'Timed out') {
stats.failures++ stats.failures++
helper.writeToLog(country.url, item.status.reason, item.url) helper.writeToLog(country.url, item.status.reason, item.url)