Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace concurrentHelper

Index

Variables

backoffFactor: number = 2.0

The wait growth factor when repeatedly backing off.

backoffInitial: number = 2000

The initial wait when backing off on request rate.

backoffMax: number = 60000

The maximum wait when backing off on request rate.

concurrentFactor: number = 20

The maximum number of concurrent requests to have pending.

Functions

  • concurrentPutAll(dynamodb: DynamoDB, putInputs: PutItemInput[]): Promise<{ error: Error; input: aws.DynamoDB.PutItemInput }[]>
  • Manages a number of concurrent dynamodb putItem requests. Put requests are more powerful than batchWrites but cannot be done in batch form. Making them concurrently is the next best thing.

    Parameters

    • dynamodb: DynamoDB
    • putInputs: PutItemInput[]

    Returns Promise<{ error: Error; input: aws.DynamoDB.PutItemInput }[]>

    A Promise of an array of objects of errors with the corresponding input.

  • configure(options: { backoffFactor?: number; backoffInitial?: number; backoffMax?: number; concurrentFactor?: number }): void
  • Configure module settings for: concurrentFactor, backoffInitial, backoffMax, backoffFactor. See the module member for individual documentation.

    Parameters

    • options: { backoffFactor?: number; backoffInitial?: number; backoffMax?: number; concurrentFactor?: number }

      an object with optional values for the settings

      • Optional backoffFactor?: number
      • Optional backoffInitial?: number
      • Optional backoffMax?: number
      • Optional concurrentFactor?: number

    Returns void

Generated using TypeDoc