aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-12-24 16:59:17 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-12-24 16:59:17 +0100
commit7920c273a204e2469416a30b752b12ccd3160102 (patch)
tree5b3d9ab9596dd5eb079a281f82b836e03eff1617 /server/lib/friends.js
parent3897209f46f4c4581be2b8963bf9acc28ca5032b (diff)
downloadPeerTube-7920c273a204e2469416a30b752b12ccd3160102.tar.gz
PeerTube-7920c273a204e2469416a30b752b12ccd3160102.tar.zst
PeerTube-7920c273a204e2469416a30b752b12ccd3160102.zip
Move tags in another table
Diffstat (limited to 'server/lib/friends.js')
-rw-r--r--server/lib/friends.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/lib/friends.js b/server/lib/friends.js
index 3ed29f651..ad9e4fdae 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -66,10 +66,12 @@ function makeFriends (hosts, callback) {
66function quitFriends (callback) { 66function quitFriends (callback) {
67 // Stop pool requests 67 // Stop pool requests
68 db.Request.deactivate() 68 db.Request.deactivate()
69 // Flush pool requests
70 db.Request.flush()
71 69
72 waterfall([ 70 waterfall([
71 function flushRequests (callbackAsync) {
72 db.Request.flush(callbackAsync)
73 },
74
73 function getPodsList (callbackAsync) { 75 function getPodsList (callbackAsync) {
74 return db.Pod.list(callbackAsync) 76 return db.Pod.list(callbackAsync)
75 }, 77 },
@@ -118,7 +120,7 @@ function removeVideoToFriends (videoParams) {
118} 120}
119 121
120function sendOwnedVideosToPod (podId) { 122function sendOwnedVideosToPod (podId) {
121 db.Video.listOwnedAndPopulateAuthor(function (err, videosList) { 123 db.Video.listOwnedAndPopulateAuthorAndTags(function (err, videosList) {
122 if (err) { 124 if (err) {
123 logger.error('Cannot get the list of videos we own.') 125 logger.error('Cannot get the list of videos we own.')
124 return 126 return
@@ -226,7 +228,7 @@ function makeRequestsToWinningPods (cert, podsList, callback) {
226 } 228 }
227 229
228 // Add our videos to the request scheduler 230 // Add our videos to the request scheduler
229 sendOwnedVideosToPod(podCreated._id) 231 sendOwnedVideosToPod(podCreated.id)
230 232
231 return callbackEach() 233 return callbackEach()
232 }) 234 })