]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Don't fail remote transcoding on retry
authorChocobozzz <me@florianbigard.com>
Fri, 26 May 2023 07:28:44 +0000 (09:28 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 26 May 2023 07:28:44 +0000 (09:28 +0200)
server/lib/runners/job-handlers/abstract-vod-transcoding-job-handler.ts

index a910ae383b1b06790cbd3a84359e6de84d9963d8..f425828d9f22753248cfa02e6b5dee67c5d45ce1 100644 (file)
@@ -4,7 +4,7 @@ import { logger } from '@server/helpers/logger'
 import { moveToFailedTranscodingState, moveToNextState } from '@server/lib/video-state'
 import { VideoJobInfoModel } from '@server/models/video/video-job-info'
 import { MRunnerJob } from '@server/types/models/runners'
-import { RunnerJobSuccessPayload, RunnerJobUpdatePayload, RunnerJobVODPrivatePayload } from '@shared/models'
+import { RunnerJobState, RunnerJobSuccessPayload, RunnerJobUpdatePayload, RunnerJobVODPrivatePayload } from '@shared/models'
 import { AbstractJobHandler } from './abstract-job-handler'
 import { loadTranscodingRunnerVideo } from './shared'
 
@@ -29,7 +29,10 @@ export abstract class AbstractVODTranscodingJobHandler <C, U extends RunnerJobUp
 
   protected async specificError (options: {
     runnerJob: MRunnerJob
+    nextState: RunnerJobState
   }) {
+    if (options.nextState !== RunnerJobState.ERRORED) return
+
     const video = await loadTranscodingRunnerVideo(options.runnerJob, this.lTags)
     if (!video) return