Skip to content

chore: stop standby requests from spawning duplicate crawlers - #135

Draft
nikitachapovskii-dev wants to merge 2 commits into
masterfrom
fix/crawler-cache-key
Draft

chore: stop standby requests from spawning duplicate crawlers#135
nikitachapovskii-dev wants to merge 2 commits into
masterfrom
fix/crawler-cache-key

Conversation

@nikitachapovskii-dev

@nikitachapovskii-dev nikitachapovskii-dev commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

getCrawlerKey was JSON.stringify(crawlerOptions), which serialized the constructed ProxyConfiguration including its child logger. debugMode flips the process-wide log level, so a single standby request changed one byte of the key, missed the pre-started crawlers, and forked new ones. Nothing evicts crawlers, so each fork leaks for the life of the run.

The log level is now set once from the run input. A request's own debugMode still fills the debug field of its response.
The key is now a hash of the settings that need a separate crawler, taken from the caller's proxy options rather than the constructed instance. The proxy password no longer lands in the key, which is logged and used as the request queue name.
Which settings deserve their own crawler is unchanged here; that's the follow-up PR.

Related to #60

@nikitachapovskii-dev nikitachapovskii-dev self-assigned this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants