resolveTotalWorkers static method

int resolveTotalWorkers(
  1. int? totalWorkers, {
  2. APIConfig? apiConfig,
})

Implementation

static int resolveTotalWorkers(int? totalWorkers, {APIConfig? apiConfig}) {
  totalWorkers ??= apiConfig?.getPath('server', 'totalWorkers');

  return (totalWorkers ?? 1).clamp(1, 100);
}