Skip to Content
APIPlanning Center People TSSrcFunctionsFunction: processInBatches()

planning-center-monorepo v1.0.0


planning-center-monorepo / planning-center-people-ts/src / processInBatches

Function: processInBatches()

processInBatches<T, R>(items, batchSize, processor, options?): Promise<R[]>

Defined in: packages/planning-center-people-ts/src/performance.ts:26 

Process items in batches to avoid overwhelming the API. Pass client in options to log batch progress when debug is enabled.

Type Parameters

T

T

R

R

Parameters

items

T[]

batchSize

number

processor

(batch) => Promise<R[]>

options?

client?

PcoClient

Returns

Promise<R[]>