From 5e47f6ab984a7d00782e4c7030afffa1ba480add Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 4 May 2023 15:29:34 +0200 Subject: Support studio transcoding in peertube runner --- server/lib/runners/job-handlers/abstract-job-handler.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'server/lib/runners/job-handlers/abstract-job-handler.ts') diff --git a/server/lib/runners/job-handlers/abstract-job-handler.ts b/server/lib/runners/job-handlers/abstract-job-handler.ts index 74b455107..76fd1c5ac 100644 --- a/server/lib/runners/job-handlers/abstract-job-handler.ts +++ b/server/lib/runners/job-handlers/abstract-job-handler.ts @@ -1,3 +1,4 @@ +import { throttle } from 'lodash' import { retryTransactionWrapper } from '@server/helpers/database-utils' import { logger, loggerTagsFactory } from '@server/helpers/logger' import { RUNNER_JOBS } from '@server/initializers/constants' @@ -14,6 +15,8 @@ import { RunnerJobSuccessPayload, RunnerJobType, RunnerJobUpdatePayload, + RunnerJobVideoEditionTranscodingPayload, + RunnerJobVideoEditionTranscodingPrivatePayload, RunnerJobVODAudioMergeTranscodingPayload, RunnerJobVODAudioMergeTranscodingPrivatePayload, RunnerJobVODHLSTranscodingPayload, @@ -21,7 +24,6 @@ import { RunnerJobVODWebVideoTranscodingPayload, RunnerJobVODWebVideoTranscodingPrivatePayload } from '@shared/models' -import { throttle } from 'lodash' type CreateRunnerJobArg = { @@ -43,6 +45,11 @@ type CreateRunnerJobArg = type: Extract payload: RunnerJobLiveRTMPHLSTranscodingPayload privatePayload: RunnerJobLiveRTMPHLSTranscodingPrivatePayload + } | + { + type: Extract + payload: RunnerJobVideoEditionTranscodingPayload + privatePayload: RunnerJobVideoEditionTranscodingPrivatePayload } export abstract class AbstractJobHandler { @@ -62,6 +69,8 @@ export abstract class AbstractJobHandler { const { priority, dependsOnRunnerJob } = options + logger.debug('Creating runner job', { options, ...this.lTags(options.type) }) + const runnerJob = new RunnerJobModel({ ...pick(options, [ 'type', 'payload', 'privatePayload' ]), -- cgit v1.2.3