diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 17:17:52 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 17:17:52 +0200 |
commit | 1a42c9e2c0fb64cdbebd81b311736e752f591e0a (patch) | |
tree | e893324d730878257491428ffca634a92f1eea05 /server/controllers/api/v1/remote.js | |
parent | d56ec0d4129160a6e3b51ace3766bb325db1f101 (diff) | |
download | PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.tar.gz PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.tar.zst PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.zip |
Server: udpate async to 2.0.0
Diffstat (limited to 'server/controllers/api/v1/remote.js')
-rw-r--r-- | server/controllers/api/v1/remote.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/api/v1/remote.js b/server/controllers/api/v1/remote.js index 9c2ca86e0..f452986b8 100644 --- a/server/controllers/api/v1/remote.js +++ b/server/controllers/api/v1/remote.js | |||
@@ -1,6 +1,7 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | const async = require('async') | 3 | const each = require('async/each') |
4 | const eachSeries = require('async/eachSeries') | ||
4 | const express = require('express') | 5 | const express = require('express') |
5 | const mongoose = require('mongoose') | 6 | const mongoose = require('mongoose') |
6 | 7 | ||
@@ -32,7 +33,7 @@ function remoteVideos (req, res, next) { | |||
32 | 33 | ||
33 | // We need to process in the same order to keep consistency | 34 | // We need to process in the same order to keep consistency |
34 | // TODO: optimization | 35 | // TODO: optimization |
35 | async.eachSeries(requests, function (request, callbackEach) { | 36 | eachSeries(requests, function (request, callbackEach) { |
36 | const videoData = request.data | 37 | const videoData = request.data |
37 | 38 | ||
38 | if (request.type === 'add') { | 39 | if (request.type === 'add') { |
@@ -72,7 +73,7 @@ function removeRemoteVideo (videoToRemoveData, fromUrl, callback) { | |||
72 | logger.error('No remote video was found for this pod.', { magnetUri: videoToRemoveData.magnetUri, podUrl: fromUrl }) | 73 | logger.error('No remote video was found for this pod.', { magnetUri: videoToRemoveData.magnetUri, podUrl: fromUrl }) |
73 | } | 74 | } |
74 | 75 | ||
75 | async.each(videosList, function (video, callbackEach) { | 76 | each(videosList, function (video, callbackEach) { |
76 | logger.debug('Removing remote video %s.', video.magnetUri) | 77 | logger.debug('Removing remote video %s.', video.magnetUri) |
77 | 78 | ||
78 | video.remove(callbackEach) | 79 | video.remove(callbackEach) |