+ if (opts.tasksQueueBucketSize == null) {
+ throw new TypeError(
+ 'Cannot construct a worker node without a tasks queue bucket size option'
+ )
+ }
+ if (!Number.isSafeInteger(opts.tasksQueueBucketSize)) {
+ throw new TypeError(
+ 'Cannot construct a worker node with a tasks queue bucket size option that is not an integer'
+ )
+ }
+ if (opts.tasksQueueBucketSize <= 0) {
+ throw new RangeError(
+ 'Cannot construct a worker node with a tasks queue bucket size option that is not a positive integer'
+ )
+ }