export const checkValidPriority = (priority: number | undefined): void => {
if (priority != null && !Number.isSafeInteger(priority)) {
- throw new TypeError(`Invalid property 'priority': '${priority}'`)
+ throw new TypeError(`Invalid property 'priority': '${priority.toString()}'`)
}
if (
priority != null &&
tasksQueueOptions.concurrency <= 0
) {
throw new RangeError(
- `Invalid worker node tasks concurrency: ${tasksQueueOptions.concurrency} is a negative integer or zero`
+ `Invalid worker node tasks concurrency: ${tasksQueueOptions.concurrency.toString()} is a negative integer or zero`
)
}
if (
}
if (tasksQueueOptions?.size != null && tasksQueueOptions.size <= 0) {
throw new RangeError(
- `Invalid worker node tasks queue size: ${tasksQueueOptions.size} is a negative integer or zero`
+ `Invalid worker node tasks queue size: ${tasksQueueOptions.size.toString()} is a negative integer or zero`
)
}
}
}
}
if (env.NODE_ENV === 'test') {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
exports.updateMeasurementStatistics = updateMeasurementStatistics
}
): void => {
const workerTaskStatistics = workerUsage.tasks
if (
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
workerTaskStatistics.executing != null &&
workerTaskStatistics.executing > 0
) {
case WorkerTypes.cluster:
return cluster.fork(opts.env) as unknown as Worker
default:
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new Error(`Unknown worker type '${type}'`)
}
}