mirror of
https://github.com/fluencelabs/dweb-transports
synced 2025-03-15 10:30:48 +00:00
Tweak http queue
This commit is contained in:
parent
46388ea16f
commit
b137ab82c1
@ -30,7 +30,7 @@ function queueSetup({concurrency}) {
|
|||||||
fetch(task.req)
|
fetch(task.req)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
debug("Fetch of %s succeded", task.what);
|
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);
|
debug("Raising concurrency to %s", httpTaskQueue.concurrency);
|
||||||
cb(null);
|
cb(null);
|
||||||
task.cb(null, res);
|
task.cb(null, res);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user