From a437b689418d3f916c4cacc64c94b51a86039ad4 Mon Sep 17 00:00:00 2001 From: abdeljalil09 <101262837+abdeljalil09@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:13:29 +0100 Subject: [PATCH] fix:high-memory-usage-when-providing-float-to-concurrency --- lib/queue.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/queue.js b/lib/queue.js index 195e442ed..45d3cb1aa 100755 --- a/lib/queue.js +++ b/lib/queue.js @@ -912,6 +912,9 @@ Queue.prototype.isPaused = async function(isLocal) { }; Queue.prototype.run = function(concurrency, handlerName) { + if(!Number.isInteger(concurrency)) { + throw new Error('Cannot set Float as concurrency'); + } const promises = []; return this.isReady()