SessionPoolOptions
Properties
maxPoolSize
Type: number
= 1000
Maximum size of the pool. Indicates how many sessions are rotated.
sessionOptions
Type: SessionOptions
The configuration options for Session
instances.
persistStateKeyValueStoreId
Type: string
Name or Id of KeyValueStore
where is the SessionPool
state stored.
persistStateKey
Type: string
= ""SESSION_POOL_STATE""
Session pool persists it's state under this key in Key value store.
createSessionFunction
Type: CreateSession
Custom function that should return Session
instance. Any error thrown from this function will terminate the process. Function receives SessionPool
instance as a parameter
forceCloud
Type: boolean
= false
If set to true
then the function uses cloud storage usage even if the APIFY_LOCAL_STORAGE_DIR
environment variable is set. This way it is possible
to combine local and cloud storage.
Note: If you use forceCloud
, it is recommended to also set the persistStateKeyValueStoreId
option, as otherwise the KeyValueStore
will be
unnamed!