Skip to main content
Version: 3.7

MemoryStorage

Represents a storage capable of working with datasets, KV stores and request queues.

Implements

Index

Constructors

constructor

Properties

readonlydatasetClientsHandled

datasetClientsHandled: DatasetClient<Dictionary>[] = []

readonlydatasetsDirectory

datasetsDirectory: string

readonlykeyValueStoresDirectory

keyValueStoresDirectory: string

readonlykeyValueStoresHandled

keyValueStoresHandled: KeyValueStoreClient[] = []

readonlylocalDataDirectory

localDataDirectory: string

readonlypersistStorage

persistStorage: boolean

readonlyrequestQueuesDirectory

requestQueuesDirectory: string

readonlyrequestQueuesHandled

requestQueuesHandled: RequestQueueClient[] = []

readonlywriteMetadata

writeMetadata: boolean

Methods

dataset

  • Type parameters

    • Data: Dictionary = Dictionary

    Parameters

    • id: string

    Returns DatasetClient<Data>

datasets

keyValueStore

  • Parameters

    • id: string

    Returns KeyValueStoreClient

keyValueStores

purge

  • purge(): Promise<void>
  • Cleans up the default storage directories before the run starts:

    • local directory containing the default dataset;
    • all records from the default key-value store in the local directory, except for the "INPUT" key;
    • local directory containing the default request queue.

    Returns Promise<void>

requestQueue

requestQueues

setStatusMessage

  • Parameters

    Returns Promise<void>

teardown

  • teardown(): Promise<void>
  • This method should be called at the end of the process, to ensure all data is saved.


    Returns Promise<void>