Tweak http queue

This commit is contained in:
Mitra Ardron 2019-06-26 20:41:28 +10:00
parent 46388ea16f
commit b137ab82c1

View File

@ -30,7 +30,7 @@ function queueSetup({concurrency}) {
fetch(task.req)
.then(res => {
debug("Fetch of %s succeded", task.what);
httpTaskQueue.concurrency++;
httpTaskQueue.concurrency = Math.min(httpTaskQueue.concurrency+1, httpTaskQueue.running()+6);
debug("Raising concurrency to %s", httpTaskQueue.concurrency);
cb(null);
task.cb(null, res);