Open source alternative to Semrush and Ahrefs
TypeScript backlink-analysisgoogle-search-console-mcpkeyword-researchmcpseoseo-agentseo-auditseo-automationseo-skillsseo-toolssite-audit
fix(ci): make crawl backpressure lintable (#452)
Ben Senescuf6ddf654df42
diff --git a/src/server/workflows/siteAuditWorkflowCrawl.ts b/src/server/workflows/siteAuditWorkflowCrawl.tsindex cba90cca..5080ce05 100644--- a/src/server/workflows/siteAuditWorkflowCrawl.ts+++ b/src/server/workflows/siteAuditWorkflowCrawl.ts@@ -195,10 +195,13 @@ async function runCrawlChunk(while (true) {while (inFlight.size < windowSize &&- queuedPersists <= MAX_QUEUED_PERSIST_BATCHES &&nextIndex < claimed.length &&Date.now() < deadlineAt) {+ // queuedPersists changes when persistChain settles. Keep it out of the+ // loop condition because the type-aware linter cannot see that async+ // mutation and flags the otherwise valid backpressure check.+ if (queuedPersists > MAX_QUEUED_PERSIST_BATCHES) break;launch(claimed[nextIndex]);nextIndex += 1;}