Skip to content

Make AutoscaledPool internal #3941

Description

@janbuchar
  • Follow-up to refactor!: Split off ConcurrencySystem from AutoscaledPool #3917 — with ConcurrencySystem owning all the concurrency/scaling configuration, AutoscaledPool is left as a bare task loop that BasicCrawler always constructs itself
  • No reason to keep a generic parallel task runner in the public contract of a scraping library
  • @internal on the class, AutoscaledPoolOptions and AutoscaledPoolPredicateOptions — same treatment Snapshotter/SystemStatus just got, the export stays for @crawlee/basic
  • IConcurrencySystem and ConcurrencyConsumer stay public, custom governors are still a supported story
  • Breaking, so 4.0 or never

Needs

  • crawler-level pause()/resume()/abort()autoscaledPool is public mostly because that's the only way to pause a crawler
  • read-only concurrencySystem getter on the crawler — desiredConcurrency/currentConcurrency are otherwise unreachable when the crawler owns the default system
  • rename autoscaledPoolOptions, or hoist isTaskReadyFunction/isFinishedFunction to top-level crawler options
  • accept that maybeRunIntervalSecs/taskTimeoutSecs become unreachable — the crawler never forwarded them anyway
  • check that apify-sdk-js doesn't build a pool of its own
  • rewrite the AutoscaledPool part of the v4 upgrading guide, fix the stale ApiLink in guides/configuration.mdx

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions