aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/remote
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-19 09:16:33 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-03-19 09:16:33 +0100
commitf148e5edb62c914eff12d7d4a5f879fedcfc64be (patch)
tree2846728352e1c21ed06e7a7b85396eb542108bba /server/controllers/api/remote
parent55b3394641a764b89132d0057d3fdf656dab2389 (diff)
downloadPeerTube-f148e5edb62c914eff12d7d4a5f879fedcfc64be.tar.gz
PeerTube-f148e5edb62c914eff12d7d4a5f879fedcfc64be.tar.zst
PeerTube-f148e5edb62c914eff12d7d4a5f879fedcfc64be.zip
Better real world test
Diffstat (limited to 'server/controllers/api/remote')
-rw-r--r--server/controllers/api/remote/videos.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/controllers/api/remote/videos.js b/server/controllers/api/remote/videos.js
index 98891c99e..cbd58e0e4 100644
--- a/server/controllers/api/remote/videos.js
+++ b/server/controllers/api/remote/videos.js
@@ -196,6 +196,8 @@ function quickAndDirtyUpdateVideoRetryWrapper (videoData, fromPod, finalCallback
196} 196}
197 197
198function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) { 198function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) {
199 let videoName
200
199 waterfall([ 201 waterfall([
200 databaseUtils.startSerializableTransaction, 202 databaseUtils.startSerializableTransaction,
201 203
@@ -208,6 +210,8 @@ function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) {
208 function updateVideoIntoDB (t, videoInstance, callback) { 210 function updateVideoIntoDB (t, videoInstance, callback) {
209 const options = { transaction: t } 211 const options = { transaction: t }
210 212
213 videoName = videoInstance.name
214
211 if (videoData.views) { 215 if (videoData.views) {
212 videoInstance.set('views', videoData.views) 216 videoInstance.set('views', videoData.views)
213 } 217 }
@@ -233,7 +237,7 @@ function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) {
233 return databaseUtils.rollbackTransaction(err, t, finalCallback) 237 return databaseUtils.rollbackTransaction(err, t, finalCallback)
234 } 238 }
235 239
236 logger.info('Remote video %s quick and dirty updated', videoData.name) 240 logger.info('Remote video %s quick and dirty updated', videoName)
237 return finalCallback(null) 241 return finalCallback(null)
238 }) 242 })
239} 243}