mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Add timeout and TTL to request jobs
This commit is contained in:
parent
7797350a0e
commit
71e3dfda4e
5 changed files with 33 additions and 14 deletions
|
@ -3,6 +3,7 @@ import { logger } from '../../../helpers/logger'
|
|||
import { doRequest } from '../../../helpers/requests'
|
||||
import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
|
||||
import { buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils'
|
||||
import { JOB_REQUEST_TIMEOUT } from '../../../initializers'
|
||||
|
||||
export type ActivitypubHttpUnicastPayload = {
|
||||
uri: string
|
||||
|
@ -23,7 +24,8 @@ async function processActivityPubHttpUnicast (job: kue.Job) {
|
|||
method: 'POST',
|
||||
uri,
|
||||
json: body,
|
||||
httpSignature: httpSignatureOptions
|
||||
httpSignature: httpSignatureOptions,
|
||||
timeout: JOB_REQUEST_TIMEOUT
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue