From 000a316cc362b935976ac47b73ec02923f4175c5 Mon Sep 17 00:00:00 2001 From: Gergo Moricz Date: Fri, 13 Sep 2024 16:41:27 +0200 Subject: [PATCH] fix(fire-engine): poll more frequently --- apps/api/src/scraper/WebScraper/scrapers/fireEngine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/scraper/WebScraper/scrapers/fireEngine.ts b/apps/api/src/scraper/WebScraper/scrapers/fireEngine.ts index a3f393c8..80ac7924 100644 --- a/apps/api/src/scraper/WebScraper/scrapers/fireEngine.ts +++ b/apps/api/src/scraper/WebScraper/scrapers/fireEngine.ts @@ -127,7 +127,7 @@ export async function scrapWithFireEngine({ let checkStatusResponse = await axiosInstance.get(`${process.env.FIRE_ENGINE_BETA_URL}/scrape/${_response.data.jobId}`); while (checkStatusResponse.data.processing && Date.now() - startTime < universalTimeout + waitParam) { - await new Promise(resolve => setTimeout(resolve, 1000)); // wait 1 second + await new Promise(resolve => setTimeout(resolve, 250)); // wait 0.25 seconds checkStatusResponse = await axiosInstance.get(`${process.env.FIRE_ENGINE_BETA_URL}/scrape/${_response.data.jobId}`); }