Skip to content

Commit

Permalink
fix: switch logger to debug in job
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Sep 13, 2023
1 parent 5e75178 commit 17a0001
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions jobs/crawl-sitemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ graceful.listen();
// crawl the page for caching support and localization
{
const path = url.loc.replace(config.urls.web, '');
logger.info(`crawling ${path}`);
logger.debug(`crawling ${path}`);
// eslint-disable-next-line no-await-in-loop
const { statusCode, headers, body } = await client.request({
method: 'GET',
Expand All @@ -90,7 +90,7 @@ graceful.listen();
// crawl the page + .png for social open graph image caching
{
const path = url.loc.replace(config.urls.web, '') + '.png';
logger.info(`crawling ${path}`);
logger.debug(`crawling ${path}`);
// eslint-disable-next-line no-await-in-loop
const { statusCode, headers, body } = await client.request({
method: 'GET',
Expand Down Expand Up @@ -130,7 +130,7 @@ graceful.listen();
headers
);
await body.text();
logger.info('submitted sitemap to google');
logger.debug('submitted sitemap to google');
} catch (err) {
await logger.error(err);
}
Expand All @@ -152,7 +152,7 @@ graceful.listen();
headers
);
await body.text();
logger.info('submitted sitemap to yandex');
logger.debug('submitted sitemap to yandex');
} catch (err) {
await logger.error(err);
}
Expand Down Expand Up @@ -205,14 +205,14 @@ graceful.listen();
);
// eslint-disable-next-line no-await-in-loop
await body.text();
logger.info('submitted %s urls to bing', urlList.length);
logger.debug('submitted %s urls to bing', urlList.length);
} catch (err) {
// eslint-disable-next-line no-await-in-loop
await logger.error(err);
}
}

logger.info('submitted sitemap to bing');
logger.debug('submitted sitemap to bing');
}

// after successful run wait 24 hours then exit
Expand Down

0 comments on commit 17a0001

Please sign in to comment.