diff options
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r-- | server/lib/job-queue/handlers/activitypub-http-broadcast.ts | 10 | ||||
-rw-r--r-- | server/lib/job-queue/handlers/activitypub-http-unicast.ts | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/server/lib/job-queue/handlers/activitypub-http-broadcast.ts b/server/lib/job-queue/handlers/activitypub-http-broadcast.ts index e4d3dbbff..7174786d6 100644 --- a/server/lib/job-queue/handlers/activitypub-http-broadcast.ts +++ b/server/lib/job-queue/handlers/activitypub-http-broadcast.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import * as Bull from 'bull' | ||
2 | import * as Bluebird from 'bluebird' | 1 | import * as Bluebird from 'bluebird' |
2 | import * as Bull from 'bull' | ||
3 | import { ActivitypubHttpBroadcastPayload } from '@shared/models' | ||
3 | import { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
4 | import { doRequest } from '../../../helpers/requests' | 5 | import { doRequest } from '../../../helpers/requests' |
5 | import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' | 6 | import { BROADCAST_CONCURRENCY, REQUEST_TIMEOUT } from '../../../initializers/constants' |
6 | import { BROADCAST_CONCURRENCY, JOB_REQUEST_TIMEOUT } from '../../../initializers/constants' | ||
7 | import { ActorFollowScoreCache } from '../../files-cache' | 7 | import { ActorFollowScoreCache } from '../../files-cache' |
8 | import { ActivitypubHttpBroadcastPayload } from '@shared/models' | 8 | import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' |
9 | 9 | ||
10 | async function processActivityPubHttpBroadcast (job: Bull.Job) { | 10 | async function processActivityPubHttpBroadcast (job: Bull.Job) { |
11 | logger.info('Processing ActivityPub broadcast in job %d.', job.id) | 11 | logger.info('Processing ActivityPub broadcast in job %d.', job.id) |
@@ -20,7 +20,7 @@ async function processActivityPubHttpBroadcast (job: Bull.Job) { | |||
20 | uri: '', | 20 | uri: '', |
21 | json: body, | 21 | json: body, |
22 | httpSignature: httpSignatureOptions, | 22 | httpSignature: httpSignatureOptions, |
23 | timeout: JOB_REQUEST_TIMEOUT, | 23 | timeout: REQUEST_TIMEOUT, |
24 | headers: buildGlobalHeaders(body) | 24 | headers: buildGlobalHeaders(body) |
25 | } | 25 | } |
26 | 26 | ||
diff --git a/server/lib/job-queue/handlers/activitypub-http-unicast.ts b/server/lib/job-queue/handlers/activitypub-http-unicast.ts index b65eeb677..74989d62e 100644 --- a/server/lib/job-queue/handlers/activitypub-http-unicast.ts +++ b/server/lib/job-queue/handlers/activitypub-http-unicast.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import * as Bull from 'bull' | 1 | import * as Bull from 'bull' |
2 | import { ActivitypubHttpUnicastPayload } from '@shared/models' | ||
2 | import { logger } from '../../../helpers/logger' | 3 | import { logger } from '../../../helpers/logger' |
3 | import { doRequest } from '../../../helpers/requests' | 4 | import { doRequest } from '../../../helpers/requests' |
4 | import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' | 5 | import { REQUEST_TIMEOUT } from '../../../initializers/constants' |
5 | import { JOB_REQUEST_TIMEOUT } from '../../../initializers/constants' | ||
6 | import { ActorFollowScoreCache } from '../../files-cache' | 6 | import { ActorFollowScoreCache } from '../../files-cache' |
7 | import { ActivitypubHttpUnicastPayload } from '@shared/models' | 7 | import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' |
8 | 8 | ||
9 | async function processActivityPubHttpUnicast (job: Bull.Job) { | 9 | async function processActivityPubHttpUnicast (job: Bull.Job) { |
10 | logger.info('Processing ActivityPub unicast in job %d.', job.id) | 10 | logger.info('Processing ActivityPub unicast in job %d.', job.id) |
@@ -20,7 +20,7 @@ async function processActivityPubHttpUnicast (job: Bull.Job) { | |||
20 | uri, | 20 | uri, |
21 | json: body, | 21 | json: body, |
22 | httpSignature: httpSignatureOptions, | 22 | httpSignature: httpSignatureOptions, |
23 | timeout: JOB_REQUEST_TIMEOUT, | 23 | timeout: REQUEST_TIMEOUT, |
24 | headers: buildGlobalHeaders(body) | 24 | headers: buildGlobalHeaders(body) |
25 | } | 25 | } |
26 | 26 | ||