Originally, AutoscaledPool was just a single class that handled everything. Now it's split into 3 different classes. As such, the configuration changed dramatically. The API is the same however.
Mainly the parameter workerFunction
was replaced with combination of 3 parameters runTaskFunction
, isTaskReadyFunction
and isFinishedFunction
. For more information and examples check AutoscaledPool documentation.
If you were using any of the following options, you should see the current documentation and migrate accordingly:
options.workerFunction
- REMOVED; see
options.runTaskFunction
for similar functionality
- REMOVED; see
options.finishWhenEmpty
- REMOVED; see
options.isFinishedFunction
for similar functionality
- REMOVED; see
options.ignoreMainProcess
- REMOVED;
options.maxMemoryMbytes
- MOVED; use
options.snapshotterOptions.maxMemoryMbytes
- MOVED; use
options.minFreeMemoryRatio
- MOVED AND CHANGED; use
options.snapshotterOptions.maxUsedMemoryRatio
- MOVED AND CHANGED; use
options.maybeRunIntervalMillis
- CHANGED; use
options.maybeRunIntervalSecs
- CHANGED; use
options.loggingIntervalMillis
- CHANGED; use
options.loggingIntervalSecs
- CHANGED; use
For more configuration options, see Snapshotter and SystemStatus documentation.
Previously, setting e.g. options.isFinishedFunction
directly on the options object passed to
a Crawler constructor would configure the underlying AutoscaledPool. From v0.8.0,
the options are available under options.autoscaledPoolOptions
. Setting a custom isFinishedFunction
is therefore done using options.autoscaledPoolOptions.isFinishedFunction
.
Frequently used properties minConcurrency
and maxConcurrency
are exempted and can still be used
directly as options.minConcurrency
.