diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-10-17 21:38:14 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-10-17 21:38:14 +0200 |
commit | c2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1 (patch) | |
tree | 2f0bfb4030f532514d38819225e63353115eb330 /server/models | |
parent | 464853031832d39eb42807436b4b714798fcb729 (diff) | |
download | PeerTube-c2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1.tar.gz PeerTube-c2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1.tar.zst PeerTube-c2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1.zip |
Server: wait pod removal when finishing a request
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/request.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/models/request.js b/server/models/request.js index 2d1c5af15..1a99dd2ea 100644 --- a/server/models/request.js +++ b/server/models/request.js | |||
@@ -185,14 +185,14 @@ function makeRequests () { | |||
185 | if (success === true) { | 185 | if (success === true) { |
186 | logger.debug('Removing requests for %s pod.', toPodId, { requestsIds: requestToMake.ids }) | 186 | logger.debug('Removing requests for %s pod.', toPodId, { requestsIds: requestToMake.ids }) |
187 | 187 | ||
188 | // Remove the pod id of these request ids | ||
189 | removePodOf.call(self, requestToMake.ids, toPodId) | ||
190 | goodPods.push(toPodId) | 188 | goodPods.push(toPodId) |
189 | |||
190 | // Remove the pod id of these request ids | ||
191 | removePodOf.call(self, requestToMake.ids, toPodId, callbackEach) | ||
191 | } else { | 192 | } else { |
192 | badPods.push(toPodId) | 193 | badPods.push(toPodId) |
194 | callbackEach() | ||
193 | } | 195 | } |
194 | |||
195 | callbackEach() | ||
196 | }) | 196 | }) |
197 | }) | 197 | }) |
198 | }, function () { | 198 | }, function () { |