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:
parent
55b3394641
commit
f148e5edb6
3 changed files with 147 additions and 19 deletions
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue