MCPcopy Index your code
hub / github.com/omkarcloud/botasaurus / determineMaxLimit

Function determineMaxLimit

js/botasaurus-js/src/task.ts:376–381  ·  view source on GitHub ↗
(parallelOption: number | ((data: any) => number) | undefined)

Source from the content-addressed store, hash-verified

374}
375
376export function determineMaxLimit(parallelOption: number | ((data: any) => number) | undefined) {
377 const parallelCount = typeof parallelOption === 'function' ? parallelOption(null) : (parallelOption ?? 1)
378
379 const maxLimit = Math.max(1, parallelCount)
380 return maxLimit
381}
382
383export async function drainQueue(
384 state: { promises: Promise<any>[], draining: boolean },

Callers 2

performPlaywrightFunction · 0.90
performTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected