Skip to content

Home / node / Commands / interfaces / BaseBatchOptions @valkey/valkey-glide


@valkey/valkey-glide / Commands / BaseBatchOptions

Interface: BaseBatchOptions

Base options settings class for sending a batch request. Shared settings for standalone and cluster batch requests.

Timeout

The duration in milliseconds that the client should wait for the batch request to complete. This duration encompasses sending the request, awaiting a response from the server, and any required reconnections or retries. If the specified timeout is exceeded for a pending request, it will result in a timeout error. If not explicitly set, the client's requestTimeout will be used.

Example

const options: BaseBatchOptions = {
  timeout: 5000, // 5 seconds
};

Properties

timeout?

optional timeout: number

The duration in milliseconds that the client should wait for the batch request to complete. This duration encompasses sending the request, awaiting a response from the server, and any required reconnections or retries. If the specified timeout is exceeded for a pending request, it will result in a timeout error. If not explicitly set, the client's requestTimeout will be used.