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

Better real world test

This commit is contained in:
Chocobozzz 2017-03-19 09:16:33 +01:00
parent 55b3394641
commit f148e5edb6
3 changed files with 147 additions and 19 deletions

View file

@ -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)
})
}