aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/job-queue.ts
diff options
context:
space:
mode:
authorGérald Niel <gerald.niel@gegeweb.org>2018-04-19 07:54:51 +0200
committerGérald Niel <gerald.niel@gegeweb.org>2018-04-19 07:54:51 +0200
commit0030284b0df2983914291d6fe83675e2aa892e6a (patch)
tree2379f6f0c8a5e6ec1cb86d4bc808c7c48a4c4422 /server/lib/job-queue/job-queue.ts
parentea5cd0fa2cdc7655ed5ecf134dedd52400837ef2 (diff)
parentf55e5a7bf81c2c27db1514273e3366511aabf4ae (diff)
downloadPeerTube-0030284b0df2983914291d6fe83675e2aa892e6a.tar.gz
PeerTube-0030284b0df2983914291d6fe83675e2aa892e6a.tar.zst
PeerTube-0030284b0df2983914291d6fe83675e2aa892e6a.zip
Merge branch 'develop' of framagit.org:chocobozzz/PeerTube into develop
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r--server/lib/job-queue/job-queue.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts
index 1dc28755e..bf40a9206 100644
--- a/server/lib/job-queue/job-queue.ts
+++ b/server/lib/job-queue/job-queue.ts
@@ -8,11 +8,13 @@ import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './
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, VideoFilePayload } from './handlers/video-file'
11import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow'
11 12
12type CreateJobArgument = 13type CreateJobArgument =
13 { type: 'activitypub-http-broadcast', payload: ActivitypubHttpBroadcastPayload } | 14 { type: 'activitypub-http-broadcast', payload: ActivitypubHttpBroadcastPayload } |
14 { type: 'activitypub-http-unicast', payload: ActivitypubHttpUnicastPayload } | 15 { type: 'activitypub-http-unicast', payload: ActivitypubHttpUnicastPayload } |
15 { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } | 16 { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } |
17 { type: 'activitypub-follow', payload: ActivitypubFollowPayload } |
16 { type: 'video-file', payload: VideoFilePayload } | 18 { type: 'video-file', payload: VideoFilePayload } |
17 { type: 'email', payload: EmailPayload } 19 { type: 'email', payload: EmailPayload }
18 20
@@ -20,6 +22,7 @@ const handlers: { [ id in JobType ]: (job: kue.Job) => Promise<any>} = {
20 'activitypub-http-broadcast': processActivityPubHttpBroadcast, 22 'activitypub-http-broadcast': processActivityPubHttpBroadcast,
21 'activitypub-http-unicast': processActivityPubHttpUnicast, 23 'activitypub-http-unicast': processActivityPubHttpUnicast,
22 'activitypub-http-fetcher': processActivityPubHttpFetcher, 24 'activitypub-http-fetcher': processActivityPubHttpFetcher,
25 'activitypub-follow': processActivityPubFollow,
23 'video-file': processVideoFile, 26 'video-file': processVideoFile,
24 'email': processEmail 27 'email': processEmail
25} 28}
@@ -50,7 +53,7 @@ class JobQueue {
50 } 53 }
51 }) 54 })
52 55
53 this.jobQueue.setMaxListeners(15) 56 this.jobQueue.setMaxListeners(20)
54 57
55 this.jobQueue.on('error', err => { 58 this.jobQueue.on('error', err => {
56 logger.error('Error in job queue.', { err }) 59 logger.error('Error in job queue.', { err })