aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-14 18:06:58 +0200
committerChocobozzz <me@florianbigard.com>2021-06-15 08:21:31 +0200
commit7500d6c9000b531fda1fd64e188b7cf83803941a (patch)
tree4329c72654b0d6526366cf47de588b7c7d72e073 /server/lib/job-queue
parent3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4 (diff)
downloadPeerTube-7500d6c9000b531fda1fd64e188b7cf83803941a.tar.gz
PeerTube-7500d6c9000b531fda1fd64e188b7cf83803941a.tar.zst
PeerTube-7500d6c9000b531fda1fd64e188b7cf83803941a.zip
Use a global request timeout
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r--server/lib/job-queue/handlers/activitypub-http-broadcast.ts3
-rw-r--r--server/lib/job-queue/handlers/activitypub-http-unicast.ts2
2 files changed, 1 insertions, 4 deletions
diff --git a/server/lib/job-queue/handlers/activitypub-http-broadcast.ts b/server/lib/job-queue/handlers/activitypub-http-broadcast.ts
index c69ff9e83..d4b328635 100644
--- a/server/lib/job-queue/handlers/activitypub-http-broadcast.ts
+++ b/server/lib/job-queue/handlers/activitypub-http-broadcast.ts
@@ -3,7 +3,7 @@ import * as Bull from 'bull'
3import { ActivitypubHttpBroadcastPayload } from '@shared/models' 3import { ActivitypubHttpBroadcastPayload } from '@shared/models'
4import { logger } from '../../../helpers/logger' 4import { logger } from '../../../helpers/logger'
5import { doRequest } from '../../../helpers/requests' 5import { doRequest } from '../../../helpers/requests'
6import { BROADCAST_CONCURRENCY, REQUEST_TIMEOUT } from '../../../initializers/constants' 6import { BROADCAST_CONCURRENCY } from '../../../initializers/constants'
7import { ActorFollowScoreCache } from '../../files-cache' 7import { ActorFollowScoreCache } from '../../files-cache'
8import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' 8import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils'
9 9
@@ -19,7 +19,6 @@ async function processActivityPubHttpBroadcast (job: Bull.Job) {
19 method: 'POST' as 'POST', 19 method: 'POST' as 'POST',
20 json: body, 20 json: body,
21 httpSignature: httpSignatureOptions, 21 httpSignature: httpSignatureOptions,
22 timeout: REQUEST_TIMEOUT,
23 headers: buildGlobalHeaders(body) 22 headers: buildGlobalHeaders(body)
24 } 23 }
25 24
diff --git a/server/lib/job-queue/handlers/activitypub-http-unicast.ts b/server/lib/job-queue/handlers/activitypub-http-unicast.ts
index 585dad671..9e561c6b7 100644
--- a/server/lib/job-queue/handlers/activitypub-http-unicast.ts
+++ b/server/lib/job-queue/handlers/activitypub-http-unicast.ts
@@ -2,7 +2,6 @@ import * as Bull from 'bull'
2import { ActivitypubHttpUnicastPayload } from '@shared/models' 2import { ActivitypubHttpUnicastPayload } from '@shared/models'
3import { logger } from '../../../helpers/logger' 3import { logger } from '../../../helpers/logger'
4import { doRequest } from '../../../helpers/requests' 4import { doRequest } from '../../../helpers/requests'
5import { REQUEST_TIMEOUT } from '../../../initializers/constants'
6import { ActorFollowScoreCache } from '../../files-cache' 5import { ActorFollowScoreCache } from '../../files-cache'
7import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils' 6import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils'
8 7
@@ -19,7 +18,6 @@ async function processActivityPubHttpUnicast (job: Bull.Job) {
19 method: 'POST' as 'POST', 18 method: 'POST' as 'POST',
20 json: body, 19 json: body,
21 httpSignature: httpSignatureOptions, 20 httpSignature: httpSignatureOptions,
22 timeout: REQUEST_TIMEOUT,
23 headers: buildGlobalHeaders(body) 21 headers: buildGlobalHeaders(body)
24 } 22 }
25 23