MCPcopy Create free account
hub / github.com/middleapi/orpc / #processPendingBatches

Method #processPendingBatches

packages/client/src/plugins/batch.ts:199–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197 }
198
199 async #processPendingBatches(): Promise<void> {
200 const pending = this.pending
201 this.pending = new Map()
202
203 for (const [group, items] of pending) {
204 const getItems = items.filter(([options]) => options.request.method === 'GET')
205 const restItems = items.filter(([options]) => options.request.method !== 'GET')
206
207 this.#executeBatch('GET', group, getItems)
208 this.#executeBatch('POST', group, restItems)
209 }
210 }
211
212 async #executeBatch(
213 method: 'GET' | 'POST',

Callers 1

initMethod · 0.95

Calls 1

#executeBatchMethod · 0.95

Tested by

no test coverage detected