1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

expliciting type checks and predicates (server only)

This commit is contained in:
Rigel Kent 2018-07-25 22:01:25 +02:00
parent 5f7021c33d
commit c1e791bad0
No known key found for this signature in database
GPG key ID: EA12971B0E438F36
34 changed files with 127 additions and 84 deletions

View file

@ -28,7 +28,7 @@ async function processVideoFileImport (job: Bull.Job) {
const video = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(payload.videoUUID)
// No video, maybe deleted?
if (!video) {
logger.info('Do not process job %d, video does not exist.', job.id, { videoUUID: video.uuid })
logger.info('Do not process job %d, video does not exist.', job.id)
return undefined
}
@ -45,13 +45,13 @@ async function processVideoFile (job: Bull.Job) {
const video = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(payload.videoUUID)
// No video, maybe deleted?
if (!video) {
logger.info('Do not process job %d, video does not exist.', job.id, { videoUUID: video.uuid })
logger.info('Do not process job %d, video does not exist.', job.id)
return undefined
}
// Transcoding in other resolution
if (payload.resolution) {
await video.transcodeOriginalVideofile(payload.resolution, payload.isPortraitMode)
await video.transcodeOriginalVideofile(payload.resolution, payload.isPortraitMode || false)
await retryTransactionWrapper(onVideoFileTranscoderOrImportSuccess, video)
} else {