From e9ccfa2fd4221ddff4950d5180ee5c8fb0bf8117 Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 25 Feb 2019 12:06:27 -0400 Subject: Metadata (stored, throttle, status, and more) --- general-util.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'general-util.js') diff --git a/general-util.js b/general-util.js index 708e150..a7bfb11 100644 --- a/general-util.js +++ b/general-util.js @@ -111,7 +111,7 @@ module.exports.throttlePromise = function(maximumAtOneTime = 10) { }) } - return function(callback) { + const enqueue = function(callback) { if (activeCount >= maximumAtOneTime) { return new Promise((resolve, reject) => { queue.push(function() { @@ -122,6 +122,10 @@ module.exports.throttlePromise = function(maximumAtOneTime = 10) { return execute(callback) } } + + enqueue.queue = queue + + return enqueue } module.exports.getTimeStringsFromSec = function(curSecTotal, lenSecTotal) { -- cgit 1.3.0-6-gf8a5