From dcd75f786c42b4cc2049b17d535b3de3b7702fbc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Mar 2021 10:10:55 +0100 Subject: Rename request timeout --- server/lib/job-queue/handlers/activitypub-http-broadcast.ts | 10 +++++----- server/lib/job-queue/handlers/activitypub-http-unicast.ts | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'server/lib/job-queue') 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 @@ -import * as Bull from 'bull' import * as Bluebird from 'bluebird' +import * as Bull from 'bull' +import { ActivitypubHttpBroadcastPayload } from '@shared/models' import { logger } from '../../../helpers/logger' import { doRequest } from '../../../helpers/requests' -import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' -import { BROADCAST_CONCURRENCY, JOB_REQUEST_TIMEOUT } from '../../../initializers/constants' +import { BROADCAST_CONCURRENCY, REQUEST_TIMEOUT } from '../../../initializers/constants' import { ActorFollowScoreCache } from '../../files-cache' -import { ActivitypubHttpBroadcastPayload } from '@shared/models' +import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' async function processActivityPubHttpBroadcast (job: Bull.Job) { logger.info('Processing ActivityPub broadcast in job %d.', job.id) @@ -20,7 +20,7 @@ async function processActivityPubHttpBroadcast (job: Bull.Job) { uri: '', json: body, httpSignature: httpSignatureOptions, - timeout: JOB_REQUEST_TIMEOUT, + timeout: REQUEST_TIMEOUT, headers: buildGlobalHeaders(body) } 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 @@ import * as Bull from 'bull' +import { ActivitypubHttpUnicastPayload } from '@shared/models' import { logger } from '../../../helpers/logger' import { doRequest } from '../../../helpers/requests' -import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' -import { JOB_REQUEST_TIMEOUT } from '../../../initializers/constants' +import { REQUEST_TIMEOUT } from '../../../initializers/constants' import { ActorFollowScoreCache } from '../../files-cache' -import { ActivitypubHttpUnicastPayload } from '@shared/models' +import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' async function processActivityPubHttpUnicast (job: Bull.Job) { logger.info('Processing ActivityPub unicast in job %d.', job.id) @@ -20,7 +20,7 @@ async function processActivityPubHttpUnicast (job: Bull.Job) { uri, json: body, httpSignature: httpSignatureOptions, - timeout: JOB_REQUEST_TIMEOUT, + timeout: REQUEST_TIMEOUT, headers: buildGlobalHeaders(body) } -- cgit v1.2.3