mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Add a pool of requests instead of making a request at each action (add
video/remove video) for performance in big networks
This commit is contained in:
parent
af82cae07d
commit
0b69752270
12 changed files with 403 additions and 210 deletions
|
@ -36,7 +36,7 @@
|
|||
|
||||
replay(
|
||||
request.post(params, function (err, response, body) {
|
||||
callbackEach(err, response, body, to_pod)
|
||||
callbackEach(err, response, body, params.url, to_pod)
|
||||
}),
|
||||
{
|
||||
retries: retries,
|
||||
|
@ -71,8 +71,8 @@
|
|||
|
||||
// Make a request for each pod
|
||||
async.each(pods, function (pod, callback_each_async) {
|
||||
function callbackEachRetryRequest (err, response, body, pod) {
|
||||
callbackEach(err, response, body, pod, function () {
|
||||
function callbackEachRetryRequest (err, response, body, url, pod) {
|
||||
callbackEach(err, response, body, url, pod, function () {
|
||||
callback_each_async()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue