Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Merge branch 'jonathan/monitoring-updates-2' of https://github.com/firecrawl/firecrawl into jonathan/monitoring-updates-2
Developers Digeste814c3e164e8
diff --cc apps/api/src/services/monitoring/runner.tsindex d4cf892cd,d4cf892cd..472139031--- a/apps/api/src/services/monitoring/runner.ts+++ b/apps/api/src/services/monitoring/runner.ts@@@ -63,6 -63,6 +63,7 @@@ const poll = (ms: number) => new Promisexport { isMonitorCheckStale, MONITOR_CHECK_STALE_TIMEOUT_MS };const MONITOR_NOTIFY_CLAIM_TTL_SECONDS = 7 * 24 * 60 * 60;++const MONITOR_CHECK_PAGE_SCAN_LIMIT = 100_000;const TERMINAL_CHECK_STATUSES = new Set(["completed","partial",@@@ -137,7 -137,7 +138,7 @@@ async function recoverTargetRunsFromRecteamId: params.monitor.team_id,monitorId: params.monitor.id,checkId: params.check.id,-- limit: 100000,++ limit: MONITOR_CHECK_PAGE_SCAN_LIMIT,skip: 0,});const recovered = [...scrapeRuns];@@@ -1040,7 -1040,7 +1041,7 @@@ async function processRemovedPagesForCoteamId: params.monitor.team_id,monitorId: params.monitor.id,checkId: params.check.id,-- limit: 100000,++ limit: MONITOR_CHECK_PAGE_SCAN_LIMIT,skip: 0,});const seen = new Set(diff --cc apps/api/src/services/monitoring/store.tsindex 2cec0f79b,1df8fe1bb..c7467dce7--- a/apps/api/src/services/monitoring/store.ts+++ b/apps/api/src/services/monitoring/store.ts@@@ -17,6 -17,6 +17,8 @@@ import typeUpdateMonitorRequest,} from "./types";++const DEFAULT_MONITOR_CRAWL_LIMIT = 10_000;++export function hashMonitorUrl(url: string): string {return `\\x${createHash("sha256").update(url).digest("hex")}`;}@@@ -36,7 -36,7 +38,7 @@@ function estimateTargetCredits(target:const limit =typeof target.crawlOptions?.limit === "number"? target.crawlOptions.limit-- : 10000;++ : DEFAULT_MONITOR_CRAWL_LIMIT;return Math.max(1, limit);}