diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-08 12:26:46 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-08 12:27:22 +0200 |
commit | 405c83f9af377a663a4c8e9ad025fd5c10496922 (patch) | |
tree | 88062f7d9e23bdf879358963975891387e388e2d /server/lib/job-queue/job-queue.ts | |
parent | d800ec5f36fa8d57f29c577bcf797a79081342d5 (diff) | |
download | PeerTube-405c83f9af377a663a4c8e9ad025fd5c10496922.tar.gz PeerTube-405c83f9af377a663a4c8e9ad025fd5c10496922.tar.zst PeerTube-405c83f9af377a663a4c8e9ad025fd5c10496922.zip |
Use worker thread to send HTTP requests
Compute HTTP signature could be CPU intensive
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index 0fcaaf466..e54d12acd 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts | |||
@@ -45,7 +45,7 @@ import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_ | |||
45 | import { Hooks } from '../plugins/hooks' | 45 | import { Hooks } from '../plugins/hooks' |
46 | import { processActivityPubCleaner } from './handlers/activitypub-cleaner' | 46 | import { processActivityPubCleaner } from './handlers/activitypub-cleaner' |
47 | import { processActivityPubFollow } from './handlers/activitypub-follow' | 47 | import { processActivityPubFollow } from './handlers/activitypub-follow' |
48 | import { processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast' | 48 | import { processActivityPubHttpSequentialBroadcast, processActivityPubParallelHttpBroadcast } from './handlers/activitypub-http-broadcast' |
49 | import { processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' | 49 | import { processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' |
50 | import { processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast' | 50 | import { processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast' |
51 | import { refreshAPObject } from './handlers/activitypub-refresher' | 51 | import { refreshAPObject } from './handlers/activitypub-refresher' |
@@ -96,8 +96,8 @@ export type CreateJobOptions = { | |||
96 | } | 96 | } |
97 | 97 | ||
98 | const handlers: { [id in JobType]: (job: Job) => Promise<any> } = { | 98 | const handlers: { [id in JobType]: (job: Job) => Promise<any> } = { |
99 | 'activitypub-http-broadcast': processActivityPubHttpBroadcast, | 99 | 'activitypub-http-broadcast': processActivityPubHttpSequentialBroadcast, |
100 | 'activitypub-http-broadcast-parallel': processActivityPubHttpBroadcast, | 100 | 'activitypub-http-broadcast-parallel': processActivityPubParallelHttpBroadcast, |
101 | 'activitypub-http-unicast': processActivityPubHttpUnicast, | 101 | 'activitypub-http-unicast': processActivityPubHttpUnicast, |
102 | 'activitypub-http-fetcher': processActivityPubHttpFetcher, | 102 | 'activitypub-http-fetcher': processActivityPubHttpFetcher, |
103 | 'activitypub-cleaner': processActivityPubCleaner, | 103 | 'activitypub-cleaner': processActivityPubCleaner, |