From f148e5edb62c914eff12d7d4a5f879fedcfc64be Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 19 Mar 2017 09:16:33 +0100 Subject: Better real world test --- server/controllers/api/remote/videos.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server/controllers/api/remote') 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 } function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) { + let videoName + waterfall([ databaseUtils.startSerializableTransaction, @@ -208,6 +210,8 @@ function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) { function updateVideoIntoDB (t, videoInstance, callback) { const options = { transaction: t } + videoName = videoInstance.name + if (videoData.views) { videoInstance.set('views', videoData.views) } @@ -233,7 +237,7 @@ function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) { return databaseUtils.rollbackTransaction(err, t, finalCallback) } - logger.info('Remote video %s quick and dirty updated', videoData.name) + logger.info('Remote video %s quick and dirty updated', videoName) return finalCallback(null) }) } -- cgit v1.2.3