diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-26 09:28:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-05-26 09:28:44 +0200 |
commit | 64aa66c4a61e1c6aa83a775e7af498e288ea82e4 (patch) | |
tree | fae98066b15c6e7f5e745a82f2d8e330c7c80e88 | |
parent | f474a519dc08df47c96ead9e0216912582def4f7 (diff) | |
download | PeerTube-64aa66c4a61e1c6aa83a775e7af498e288ea82e4.tar.gz PeerTube-64aa66c4a61e1c6aa83a775e7af498e288ea82e4.tar.zst PeerTube-64aa66c4a61e1c6aa83a775e7af498e288ea82e4.zip |
Don't fail remote transcoding on retry
-rw-r--r-- | server/lib/runners/job-handlers/abstract-vod-transcoding-job-handler.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/runners/job-handlers/abstract-vod-transcoding-job-handler.ts b/server/lib/runners/job-handlers/abstract-vod-transcoding-job-handler.ts index a910ae383..f425828d9 100644 --- a/server/lib/runners/job-handlers/abstract-vod-transcoding-job-handler.ts +++ b/server/lib/runners/job-handlers/abstract-vod-transcoding-job-handler.ts | |||
@@ -4,7 +4,7 @@ import { logger } from '@server/helpers/logger' | |||
4 | import { moveToFailedTranscodingState, moveToNextState } from '@server/lib/video-state' | 4 | import { moveToFailedTranscodingState, moveToNextState } from '@server/lib/video-state' |
5 | import { VideoJobInfoModel } from '@server/models/video/video-job-info' | 5 | import { VideoJobInfoModel } from '@server/models/video/video-job-info' |
6 | import { MRunnerJob } from '@server/types/models/runners' | 6 | import { MRunnerJob } from '@server/types/models/runners' |
7 | import { RunnerJobSuccessPayload, RunnerJobUpdatePayload, RunnerJobVODPrivatePayload } from '@shared/models' | 7 | import { RunnerJobState, RunnerJobSuccessPayload, RunnerJobUpdatePayload, RunnerJobVODPrivatePayload } from '@shared/models' |
8 | import { AbstractJobHandler } from './abstract-job-handler' | 8 | import { AbstractJobHandler } from './abstract-job-handler' |
9 | import { loadTranscodingRunnerVideo } from './shared' | 9 | import { loadTranscodingRunnerVideo } from './shared' |
10 | 10 | ||
@@ -29,7 +29,10 @@ export abstract class AbstractVODTranscodingJobHandler <C, U extends RunnerJobUp | |||
29 | 29 | ||
30 | protected async specificError (options: { | 30 | protected async specificError (options: { |
31 | runnerJob: MRunnerJob | 31 | runnerJob: MRunnerJob |
32 | nextState: RunnerJobState | ||
32 | }) { | 33 | }) { |
34 | if (options.nextState !== RunnerJobState.ERRORED) return | ||
35 | |||
33 | const video = await loadTranscodingRunnerVideo(options.runnerJob, this.lTags) | 36 | const video = await loadTranscodingRunnerVideo(options.runnerJob, this.lTags) |
34 | if (!video) return | 37 | if (!video) return |
35 | 38 | ||