diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 17:00:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 17:00:08 +0100 |
commit | a0327eedb0136c4ba7358df80b75cc56bd25ffb8 (patch) | |
tree | 7de1486d3671e85ce53c650f74f70dbf3d8845b2 /server/lib/job-queue/job-queue.ts | |
parent | 1ed9b8ee69ba42b2be70512eb8df239be4676674 (diff) | |
download | PeerTube-a0327eedb0136c4ba7358df80b75cc56bd25ffb8.tar.gz PeerTube-a0327eedb0136c4ba7358df80b75cc56bd25ffb8.tar.zst PeerTube-a0327eedb0136c4ba7358df80b75cc56bd25ffb8.zip |
Rename video-file job to video-transcoding
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index ba9cbe0d9..e73042163 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts | |||
@@ -7,7 +7,12 @@ import { ActivitypubHttpBroadcastPayload, processActivityPubHttpBroadcast } from | |||
7 | import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' | 7 | import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' |
8 | import { ActivitypubHttpUnicastPayload, processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast' | 8 | import { ActivitypubHttpUnicastPayload, processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast' |
9 | import { EmailPayload, processEmail } from './handlers/email' | 9 | import { EmailPayload, processEmail } from './handlers/email' |
10 | import { processVideoFile, processVideoFileImport, VideoFileImportPayload, VideoFilePayload } from './handlers/video-file' | 10 | import { |
11 | processVideoFileImport, | ||
12 | processVideoTranscoding, | ||
13 | VideoFileImportPayload, | ||
14 | VideoTranscodingPayload | ||
15 | } from './handlers/video-transcoding' | ||
11 | import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow' | 16 | import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow' |
12 | import { processVideoImport, VideoImportPayload } from './handlers/video-import' | 17 | import { processVideoImport, VideoImportPayload } from './handlers/video-import' |
13 | import { processVideosViews } from './handlers/video-views' | 18 | import { processVideosViews } from './handlers/video-views' |
@@ -19,19 +24,20 @@ type CreateJobArgument = | |||
19 | { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } | | 24 | { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } | |
20 | { type: 'activitypub-follow', payload: ActivitypubFollowPayload } | | 25 | { type: 'activitypub-follow', payload: ActivitypubFollowPayload } | |
21 | { type: 'video-file-import', payload: VideoFileImportPayload } | | 26 | { type: 'video-file-import', payload: VideoFileImportPayload } | |
22 | { type: 'video-file', payload: VideoFilePayload } | | 27 | { type: 'video-transcoding', payload: VideoTranscodingPayload } | |
23 | { type: 'email', payload: EmailPayload } | | 28 | { type: 'email', payload: EmailPayload } | |
24 | { type: 'video-import', payload: VideoImportPayload } | | 29 | { type: 'video-import', payload: VideoImportPayload } | |
25 | { type: 'activitypub-refresher', payload: RefreshPayload } | | 30 | { type: 'activitypub-refresher', payload: RefreshPayload } | |
26 | { type: 'videos-views', payload: {} } | 31 | { type: 'videos-views', payload: {} } |
27 | 32 | ||
28 | const handlers: { [ id in JobType ]: (job: Bull.Job) => Promise<any>} = { | 33 | const handlers: { [ id in (JobType | 'video-file') ]: (job: Bull.Job) => Promise<any>} = { |
29 | 'activitypub-http-broadcast': processActivityPubHttpBroadcast, | 34 | 'activitypub-http-broadcast': processActivityPubHttpBroadcast, |
30 | 'activitypub-http-unicast': processActivityPubHttpUnicast, | 35 | 'activitypub-http-unicast': processActivityPubHttpUnicast, |
31 | 'activitypub-http-fetcher': processActivityPubHttpFetcher, | 36 | 'activitypub-http-fetcher': processActivityPubHttpFetcher, |
32 | 'activitypub-follow': processActivityPubFollow, | 37 | 'activitypub-follow': processActivityPubFollow, |
33 | 'video-file-import': processVideoFileImport, | 38 | 'video-file-import': processVideoFileImport, |
34 | 'video-file': processVideoFile, | 39 | 'video-transcoding': processVideoTranscoding, |
40 | 'video-file': processVideoTranscoding, // TODO: remove it (changed in 1.3) | ||
35 | 'email': processEmail, | 41 | 'email': processEmail, |
36 | 'video-import': processVideoImport, | 42 | 'video-import': processVideoImport, |
37 | 'videos-views': processVideosViews, | 43 | 'videos-views': processVideosViews, |
@@ -44,7 +50,7 @@ const jobTypes: JobType[] = [ | |||
44 | 'activitypub-http-fetcher', | 50 | 'activitypub-http-fetcher', |
45 | 'activitypub-http-unicast', | 51 | 'activitypub-http-unicast', |
46 | 'email', | 52 | 'email', |
47 | 'video-file', | 53 | 'video-transcoding', |
48 | 'video-file-import', | 54 | 'video-file-import', |
49 | 'video-import', | 55 | 'video-import', |
50 | 'videos-views', | 56 | 'videos-views', |