aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-03 10:10:55 +0100
committerChocobozzz <me@florianbigard.com>2021-03-03 10:10:55 +0100
commitdcd75f786c42b4cc2049b17d535b3de3b7702fbc (patch)
treed2bb3339bf6e22b7585cd0a696c209c534d0cb2b /server/lib/job-queue
parent67bd004d843d29576f24c21437a33e1334ccb765 (diff)
downloadPeerTube-dcd75f786c42b4cc2049b17d535b3de3b7702fbc.tar.gz
PeerTube-dcd75f786c42b4cc2049b17d535b3de3b7702fbc.tar.zst
PeerTube-dcd75f786c42b4cc2049b17d535b3de3b7702fbc.zip
Rename request timeout
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r--server/lib/job-queue/handlers/activitypub-http-broadcast.ts10
-rw-r--r--server/lib/job-queue/handlers/activitypub-http-unicast.ts8
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 @@
1import * as Bull from 'bull'
2import * as Bluebird from 'bluebird' 1import * as Bluebird from 'bluebird'
2import * as Bull from 'bull'
3import { ActivitypubHttpBroadcastPayload } from '@shared/models'
3import { logger } from '../../../helpers/logger' 4import { logger } from '../../../helpers/logger'
4import { doRequest } from '../../../helpers/requests' 5import { doRequest } from '../../../helpers/requests'
5import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' 6import { BROADCAST_CONCURRENCY, REQUEST_TIMEOUT } from '../../../initializers/constants'
6import { BROADCAST_CONCURRENCY, JOB_REQUEST_TIMEOUT } from '../../../initializers/constants'
7import { ActorFollowScoreCache } from '../../files-cache' 7import { ActorFollowScoreCache } from '../../files-cache'
8import { ActivitypubHttpBroadcastPayload } from '@shared/models' 8import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils'
9 9
10async function processActivityPubHttpBroadcast (job: Bull.Job) { 10async 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 @@
1import * as Bull from 'bull' 1import * as Bull from 'bull'
2import { ActivitypubHttpUnicastPayload } from '@shared/models'
2import { logger } from '../../../helpers/logger' 3import { logger } from '../../../helpers/logger'
3import { doRequest } from '../../../helpers/requests' 4import { doRequest } from '../../../helpers/requests'
4import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' 5import { REQUEST_TIMEOUT } from '../../../initializers/constants'
5import { JOB_REQUEST_TIMEOUT } from '../../../initializers/constants'
6import { ActorFollowScoreCache } from '../../files-cache' 6import { ActorFollowScoreCache } from '../../files-cache'
7import { ActivitypubHttpUnicastPayload } from '@shared/models' 7import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils'
8 8
9async function processActivityPubHttpUnicast (job: Bull.Job) { 9async 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