* 0.1.55: tweaking queue concurrency

This commit is contained in:
Mitra Ardron 2019-06-22 21:04:22 +10:00
parent 5811c95eeb
commit 0a673fc270
4 changed files with 6 additions and 4 deletions

View File

@ -126,6 +126,7 @@ See [Dweb document index](./DOCUMENTINDEX.md) for a list of the repos that make
### Release Notes
* 0.1.55: tweaking queue concurrency
* 0.1.54: queue for http; disable fallback from IPFS to http://ipfs.io
* 0.1.53: Reenable Wolk as fixed
* 0.1.52: Gun fixes but off by default https://github.com/internetarchive/dweb-archive/issues/106

File diff suppressed because one or more lines are too long

View File

@ -36,8 +36,9 @@ function queueSetup({concurrency}) {
task.cb(null, res);
})
.catch(err => {
//TODO-QUEUE add loopguard back in
httpTaskQueue.concurrency = Math.max(httpTaskQueue.concurrency-1, 6)
// Adjust concurrency, dont go below running number (which is running-1 because this failed task counts)
// and we know browser doesnt complain below 6
httpTaskQueue.concurrency = Math.max(httpTaskQueue.concurrency-1, 6, httpTaskQueue.running()-1);
debug("Dropping concurrency to %s", httpTaskQueue.concurrency);
cb(err);
if (--task.count > 0) {

View File

@ -53,5 +53,5 @@
"test": "cd src; node ./test.js",
"help": "echo 'test (test it)'; echo 'build (creates dweb-transports-bundle)'"
},
"version": "0.1.54"
"version": "0.1.55"
}