diff options
Diffstat (limited to 'server/lib/job-queue/handlers/video-file.ts')
-rw-r--r-- | server/lib/job-queue/handlers/video-file.ts | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/server/lib/job-queue/handlers/video-file.ts b/server/lib/job-queue/handlers/video-file.ts index f5ad076a6..a5c6bf300 100644 --- a/server/lib/job-queue/handlers/video-file.ts +++ b/server/lib/job-queue/handlers/video-file.ts | |||
@@ -52,19 +52,11 @@ async function processVideoFile (job: kue.Job) { | |||
52 | if (payload.resolution) { | 52 | if (payload.resolution) { |
53 | await video.transcodeOriginalVideofile(payload.resolution, payload.isPortraitMode) | 53 | await video.transcodeOriginalVideofile(payload.resolution, payload.isPortraitMode) |
54 | 54 | ||
55 | const options = { | 55 | await retryTransactionWrapper(onVideoFileTranscoderOrImportSuccess, video) |
56 | arguments: [ video ], | ||
57 | errorMessage: 'Cannot execute onVideoFileTranscoderOrImportSuccess with many retries.' | ||
58 | } | ||
59 | await retryTransactionWrapper(onVideoFileTranscoderOrImportSuccess, options) | ||
60 | } else { | 56 | } else { |
61 | await video.optimizeOriginalVideofile() | 57 | await video.optimizeOriginalVideofile() |
62 | 58 | ||
63 | const options = { | 59 | await retryTransactionWrapper(onVideoFileOptimizerSuccess, video, payload.isNewVideo) |
64 | arguments: [ video, payload.isNewVideo ], | ||
65 | errorMessage: 'Cannot execute onVideoFileOptimizerSuccess with many retries.' | ||
66 | } | ||
67 | await retryTransactionWrapper(onVideoFileOptimizerSuccess, options) | ||
68 | } | 60 | } |
69 | 61 | ||
70 | return video | 62 | return video |