aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-12-04 16:13:32 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-12-04 16:13:32 +0100
commit0b69752270f1ceea06a29872b3db23660a55d6d3 (patch)
tree42da726633f3e48f4fe592cfd2c1ca14346a159b /src/utils.js
parentaf82cae07dc568e3cb10acd70113df56eb8b15a9 (diff)
downloadPeerTube-0b69752270f1ceea06a29872b3db23660a55d6d3.tar.gz
PeerTube-0b69752270f1ceea06a29872b3db23660a55d6d3.tar.zst
PeerTube-0b69752270f1ceea06a29872b3db23660a55d6d3.zip
Add a pool of requests instead of making a request at each action (add
video/remove video) for performance in big networks
Diffstat (limited to 'src/utils.js')
-rw-r--r--src/utils.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.js b/src/utils.js
index dda6c7a0a..4aa1fc55e 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -36,7 +36,7 @@
36 36
37 replay( 37 replay(
38 request.post(params, function (err, response, body) { 38 request.post(params, function (err, response, body) {
39 callbackEach(err, response, body, to_pod) 39 callbackEach(err, response, body, params.url, to_pod)
40 }), 40 }),
41 { 41 {
42 retries: retries, 42 retries: retries,
@@ -71,8 +71,8 @@
71 71
72 // Make a request for each pod 72 // Make a request for each pod
73 async.each(pods, function (pod, callback_each_async) { 73 async.each(pods, function (pod, callback_each_async) {
74 function callbackEachRetryRequest (err, response, body, pod) { 74 function callbackEachRetryRequest (err, response, body, url, pod) {
75 callbackEach(err, response, body, pod, function () { 75 callbackEach(err, response, body, url, pod, function () {
76 callback_each_async() 76 callback_each_async()
77 }) 77 })
78 } 78 }