diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-17 14:08:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-17 14:08:13 +0200 |
commit | f27b7a750f1876632e84d594608d3d64ce974efc (patch) | |
tree | d7f973387b4ba1776cacbf06dcffef8a9428e9fe /server/lib/job-queue/job-queue.ts | |
parent | 3396e6534592865f184ee2db32a75957c42cb887 (diff) | |
download | PeerTube-f27b7a750f1876632e84d594608d3d64ce974efc.tar.gz PeerTube-f27b7a750f1876632e84d594608d3d64ce974efc.tar.zst PeerTube-f27b7a750f1876632e84d594608d3d64ce974efc.zip |
Send views in a dedicated queue
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index d3776c3bf..f339e9135 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts | |||
@@ -43,6 +43,7 @@ import { processVideosViewsStats } from './handlers/video-views-stats' | |||
43 | 43 | ||
44 | type CreateJobArgument = | 44 | type CreateJobArgument = |
45 | { type: 'activitypub-http-broadcast', payload: ActivitypubHttpBroadcastPayload } | | 45 | { type: 'activitypub-http-broadcast', payload: ActivitypubHttpBroadcastPayload } | |
46 | { type: 'activitypub-http-broadcast-parallel', payload: ActivitypubHttpBroadcastPayload } | | ||
46 | { type: 'activitypub-http-unicast', payload: ActivitypubHttpUnicastPayload } | | 47 | { type: 'activitypub-http-unicast', payload: ActivitypubHttpUnicastPayload } | |
47 | { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } | | 48 | { type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } | |
48 | { type: 'activitypub-http-cleaner', payload: {} } | | 49 | { type: 'activitypub-http-cleaner', payload: {} } | |
@@ -68,6 +69,7 @@ export type CreateJobOptions = { | |||
68 | 69 | ||
69 | const handlers: { [id in JobType]: (job: Job) => Promise<any> } = { | 70 | const handlers: { [id in JobType]: (job: Job) => Promise<any> } = { |
70 | 'activitypub-http-broadcast': processActivityPubHttpBroadcast, | 71 | 'activitypub-http-broadcast': processActivityPubHttpBroadcast, |
72 | 'activitypub-http-broadcast-parallel': processActivityPubHttpBroadcast, | ||
71 | 'activitypub-http-unicast': processActivityPubHttpUnicast, | 73 | 'activitypub-http-unicast': processActivityPubHttpUnicast, |
72 | 'activitypub-http-fetcher': processActivityPubHttpFetcher, | 74 | 'activitypub-http-fetcher': processActivityPubHttpFetcher, |
73 | 'activitypub-cleaner': processActivityPubCleaner, | 75 | 'activitypub-cleaner': processActivityPubCleaner, |
@@ -89,6 +91,7 @@ const handlers: { [id in JobType]: (job: Job) => Promise<any> } = { | |||
89 | const jobTypes: JobType[] = [ | 91 | const jobTypes: JobType[] = [ |
90 | 'activitypub-follow', | 92 | 'activitypub-follow', |
91 | 'activitypub-http-broadcast', | 93 | 'activitypub-http-broadcast', |
94 | 'activitypub-http-broadcast-parallel', | ||
92 | 'activitypub-http-fetcher', | 95 | 'activitypub-http-fetcher', |
93 | 'activitypub-http-unicast', | 96 | 'activitypub-http-unicast', |
94 | 'activitypub-cleaner', | 97 | 'activitypub-cleaner', |