From 28be89161aab245526d64f6fb7dd29391a97fe0a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Jun 2018 09:43:18 +0200 Subject: Improve create import file job Fix federation of .ogv videos --- server/lib/job-queue/handlers/video-file.ts | 10 +++++----- server/lib/job-queue/job-queue.ts | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'server/lib') diff --git a/server/lib/job-queue/handlers/video-file.ts b/server/lib/job-queue/handlers/video-file.ts index 38eb3511c..a6fce4279 100644 --- a/server/lib/job-queue/handlers/video-file.ts +++ b/server/lib/job-queue/handlers/video-file.ts @@ -16,14 +16,14 @@ export type VideoFilePayload = { isPortraitMode?: boolean } -export type VideoImportPayload = { +export type VideoFileImportPayload = { videoUUID: string, filePath: string } -async function processVideoImport (job: kue.Job) { - const payload = job.data as VideoImportPayload - logger.info('Processing video import in job %d.', job.id) +async function processVideoFileImport (job: kue.Job) { + const payload = job.data as VideoFileImportPayload + logger.info('Processing video file import in job %d.', job.id) const video = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(payload.videoUUID) // No video, maybe deleted? @@ -132,5 +132,5 @@ async function onVideoFileOptimizerSuccess (video: VideoModel, isNewVideo: boole export { processVideoFile, - processVideoImport + processVideoFileImport } diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index 69335acf0..bdfa19b61 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts @@ -7,7 +7,7 @@ import { ActivitypubHttpBroadcastPayload, processActivityPubHttpBroadcast } from import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' import { ActivitypubHttpUnicastPayload, processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast' import { EmailPayload, processEmail } from './handlers/email' -import { processVideoFile, processVideoImport, VideoFilePayload, VideoImportPayload } from './handlers/video-file' +import { processVideoFile, processVideoFileImport, VideoFilePayload, VideoFileImportPayload } from './handlers/video-file' import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow' type CreateJobArgument = @@ -15,7 +15,7 @@ type CreateJobArgument = { type: 'activitypub-http-unicast', payload: ActivitypubHttpUnicastPayload } | { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } | { type: 'activitypub-follow', payload: ActivitypubFollowPayload } | - { type: 'video-file-import', payload: VideoImportPayload } | + { type: 'video-file-import', payload: VideoFileImportPayload } | { type: 'video-file', payload: VideoFilePayload } | { type: 'email', payload: EmailPayload } @@ -24,7 +24,7 @@ const handlers: { [ id in JobType ]: (job: kue.Job) => Promise} = { 'activitypub-http-unicast': processActivityPubHttpUnicast, 'activitypub-http-fetcher': processActivityPubHttpFetcher, 'activitypub-follow': processActivityPubFollow, - 'video-file-import': processVideoImport, + 'video-file-import': processVideoFileImport, 'video-file': processVideoFile, 'email': processEmail } -- cgit v1.2.3