aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/job-queue.ts
diff options
context:
space:
mode:
authorFlorent Fayolle <florent.fayolle69@gmail.com>2018-06-02 21:39:41 +0200
committerChocobozzz <me@florianbigard.com>2018-06-07 08:57:48 +0200
commit0138af9237b77dd7d3a49260d164193b4048de84 (patch)
tree5a377c7577cd99d5b324967187e10cd9fcc81383 /server/lib/job-queue/job-queue.ts
parent157b62b1f4450c32bb7383ccacbea555ec607013 (diff)
downloadPeerTube-0138af9237b77dd7d3a49260d164193b4048de84.tar.gz
PeerTube-0138af9237b77dd7d3a49260d164193b4048de84.tar.zst
PeerTube-0138af9237b77dd7d3a49260d164193b4048de84.zip
Add create-import-video-file-job command
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r--server/lib/job-queue/job-queue.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts
index 0333464bd..69335acf0 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
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, VideoFilePayload } from './handlers/video-file' 10import { processVideoFile, processVideoImport, VideoFilePayload, VideoImportPayload } from './handlers/video-file'
11import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow' 11import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow'
12 12
13type CreateJobArgument = 13type CreateJobArgument =
@@ -15,6 +15,7 @@ type CreateJobArgument =
15 { type: 'activitypub-http-unicast', payload: ActivitypubHttpUnicastPayload } | 15 { type: 'activitypub-http-unicast', payload: ActivitypubHttpUnicastPayload } |
16 { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } | 16 { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } |
17 { type: 'activitypub-follow', payload: ActivitypubFollowPayload } | 17 { type: 'activitypub-follow', payload: ActivitypubFollowPayload } |
18 { type: 'video-file-import', payload: VideoImportPayload } |
18 { type: 'video-file', payload: VideoFilePayload } | 19 { type: 'video-file', payload: VideoFilePayload } |
19 { type: 'email', payload: EmailPayload } 20 { type: 'email', payload: EmailPayload }
20 21
@@ -23,6 +24,7 @@ const handlers: { [ id in JobType ]: (job: kue.Job) => Promise<any>} = {
23 'activitypub-http-unicast': processActivityPubHttpUnicast, 24 'activitypub-http-unicast': processActivityPubHttpUnicast,
24 'activitypub-http-fetcher': processActivityPubHttpFetcher, 25 'activitypub-http-fetcher': processActivityPubHttpFetcher,
25 'activitypub-follow': processActivityPubFollow, 26 'activitypub-follow': processActivityPubFollow,
27 'video-file-import': processVideoImport,
26 'video-file': processVideoFile, 28 'video-file': processVideoFile,
27 'email': processEmail 29 'email': processEmail
28} 30}