1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Server: udpate async to 2.0.0

This commit is contained in:
Chocobozzz 2016-07-18 17:17:52 +02:00
parent d56ec0d412
commit 1a42c9e2c0
15 changed files with 85 additions and 72 deletions

View file

@ -1,6 +1,7 @@
'use strict'
const async = require('async')
const each = require('async/each')
const eachSeries = require('async/eachSeries')
const express = require('express')
const mongoose = require('mongoose')
@ -32,7 +33,7 @@ function remoteVideos (req, res, next) {
// We need to process in the same order to keep consistency
// TODO: optimization
async.eachSeries(requests, function (request, callbackEach) {
eachSeries(requests, function (request, callbackEach) {
const videoData = request.data
if (request.type === 'add') {
@ -72,7 +73,7 @@ function removeRemoteVideo (videoToRemoveData, fromUrl, callback) {
logger.error('No remote video was found for this pod.', { magnetUri: videoToRemoveData.magnetUri, podUrl: fromUrl })
}
async.each(videosList, function (video, callbackEach) {
each(videosList, function (video, callbackEach) {
logger.debug('Removing remote video %s.', video.magnetUri)
video.remove(callbackEach)