aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/job-queue.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 17:00:08 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 17:00:08 +0100
commita0327eedb0136c4ba7358df80b75cc56bd25ffb8 (patch)
tree7de1486d3671e85ce53c650f74f70dbf3d8845b2 /server/lib/job-queue/job-queue.ts
parent1ed9b8ee69ba42b2be70512eb8df239be4676674 (diff)
downloadPeerTube-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.ts16
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
7import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' 7import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher'
8import { ActivitypubHttpUnicastPayload, processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast' 8import { ActivitypubHttpUnicastPayload, processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast'
9import { EmailPayload, processEmail } from './handlers/email' 9import { EmailPayload, processEmail } from './handlers/email'
10import { processVideoFile, processVideoFileImport, VideoFileImportPayload, VideoFilePayload } from './handlers/video-file' 10import {
11 processVideoFileImport,
12 processVideoTranscoding,
13 VideoFileImportPayload,
14 VideoTranscodingPayload
15} from './handlers/video-transcoding'
11import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow' 16import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow'
12import { processVideoImport, VideoImportPayload } from './handlers/video-import' 17import { processVideoImport, VideoImportPayload } from './handlers/video-import'
13import { processVideosViews } from './handlers/video-views' 18import { 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
28const handlers: { [ id in JobType ]: (job: Bull.Job) => Promise<any>} = { 33const 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',