- return sequelizeTypescript.transaction(async t => {
- // Maybe the video changed in database, refresh it
- const videoDatabase = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.uuid, t)
- // Video does not exist anymore
- if (!videoDatabase) return undefined
+ return retryTransactionWrapper(() => {
+ return sequelizeTypescript.transaction(async t => {
+ // Maybe the video changed in database, refresh it
+ const videoDatabase = await VideoModel.loadFull(video.uuid, t)
+ // Video does not exist anymore
+ if (!videoDatabase) return undefined