diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-03 16:57:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-03 16:57:40 +0200 |
commit | d0ae9490a3ffd0855a970fa3980c387db08a0f89 (patch) | |
tree | 636d4b1b7884cfc3af8259107616c27a641e15e7 | |
parent | 25378bc866a69002d7447e5edc254ec7e469a1ec (diff) | |
download | PeerTube-d0ae9490a3ffd0855a970fa3980c387db08a0f89.tar.gz PeerTube-d0ae9490a3ffd0855a970fa3980c387db08a0f89.tar.zst PeerTube-d0ae9490a3ffd0855a970fa3980c387db08a0f89.zip |
Don't block when removing redundancy files
-rw-r--r-- | server/models/redundancy/video-redundancy.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts index da1c6f4a7..2ebe23ef1 100644 --- a/server/models/redundancy/video-redundancy.ts +++ b/server/models/redundancy/video-redundancy.ts | |||
@@ -122,9 +122,13 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> { | |||
122 | 122 | ||
123 | const videoFile = await VideoFileModel.loadWithVideo(instance.videoFileId) | 123 | const videoFile = await VideoFileModel.loadWithVideo(instance.videoFileId) |
124 | 124 | ||
125 | logger.info('Removing duplicated video file %s-%s.', videoFile.Video.uuid, videoFile.resolution) | 125 | const logIdentifier = `${videoFile.Video.uuid}-${videoFile.resolution}` |
126 | logger.info('Removing duplicated video file %s.', logIdentifier) | ||
126 | 127 | ||
127 | return videoFile.Video.removeFile(videoFile) | 128 | videoFile.Video.removeFile(videoFile) |
129 | .catch(err => logger.error('Cannot delete %s files.', logIdentifier, { err })) | ||
130 | |||
131 | return undefined | ||
128 | } | 132 | } |
129 | 133 | ||
130 | static async loadLocalByFileId (videoFileId: number) { | 134 | static async loadLocalByFileId (videoFileId: number) { |