function quitFriends (callback) {
// Stop pool requests
db.Request.deactivate()
- // Flush pool requests
- db.Request.flush()
waterfall([
+ function flushRequests (callbackAsync) {
+ db.Request.flush(callbackAsync)
+ },
+
function getPodsList (callbackAsync) {
return db.Pod.list(callbackAsync)
},
}
function sendOwnedVideosToPod (podId) {
- db.Video.listOwnedAndPopulateAuthor(function (err, videosList) {
+ db.Video.listOwnedAndPopulateAuthorAndTags(function (err, videosList) {
if (err) {
logger.error('Cannot get the list of videos we own.')
return
}
// Add our videos to the request scheduler
- sendOwnedVideosToPod(podCreated._id)
+ sendOwnedVideosToPod(podCreated.id)
return callbackEach()
})