Don't block when removing redundancy files

pull/1189/head
Chocobozzz 2018-10-03 16:57:40 +02:00
parent 25378bc866
commit d0ae9490a3
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 6 additions and 2 deletions

View File

@ -122,9 +122,13 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
const videoFile = await VideoFileModel.loadWithVideo(instance.videoFileId)
logger.info('Removing duplicated video file %s-%s.', videoFile.Video.uuid, videoFile.resolution)
const logIdentifier = `${videoFile.Video.uuid}-${videoFile.resolution}`
logger.info('Removing duplicated video file %s.', logIdentifier)
return videoFile.Video.removeFile(videoFile)
videoFile.Video.removeFile(videoFile)
.catch(err => logger.error('Cannot delete %s files.', logIdentifier, { err }))
return undefined
}
static async loadLocalByFileId (videoFileId: number) {