overlooker
Advanced tools
Comparing version 0.31.17 to 0.31.18
{ | ||
"name": "overlooker", | ||
"version": "0.31.17", | ||
"version": "0.31.18", | ||
"description": "tool for profile front-end performance", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -48,2 +48,4 @@ const { makeFetchPageWorkersPool } = require('./fetch-page-workers-pool.js'); | ||
const isFetchingEnded = async () => !(await checkStatus()) || expectedResultsCounter <= 0; | ||
workers.forEach((worker) => { | ||
@@ -61,3 +63,3 @@ let attemptTimeout = 5000; | ||
const sendPageToWorker = async () => { | ||
if (queue.length && await checkStatus()) { | ||
if (!(await isFetchingEnded()) && queue.length) { | ||
const queueItem = queue.shift(); | ||
@@ -77,9 +79,9 @@ | ||
if (type === messages.LOAD_PAGE_COMPLETE) { | ||
expectedResultsCounter--; | ||
await sendPageToWorker(); | ||
expectedResultsCounter--; | ||
await dataCb(payload); | ||
if (!expectedResultsCounter || !(await checkStatus())) { | ||
if (await isFetchingEnded()) { | ||
resolve(); | ||
@@ -91,3 +93,3 @@ } | ||
if (!expectedResultsCounter || !(await checkStatus())) { | ||
if (await isFetchingEnded()) { | ||
resolve(); | ||
@@ -119,3 +121,3 @@ } | ||
if (!expectedResultsCounter || !(await checkStatus())) { | ||
if (await isFetchingEnded()) { | ||
await logger(`Attempts limit reached for page: ${payload.page.name} - ${payload.page.url}`); | ||
@@ -122,0 +124,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66277814
6539