1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Fix proxy tests

This commit is contained in:
Chocobozzz 2022-10-25 15:01:51 +02:00
parent 3fc43fa0b0
commit e82cb08722
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 11 additions and 4 deletions

View file

@ -4,7 +4,14 @@ import { wait } from '@shared/core-utils'
import { JobState, JobType } from '../../models'
import { PeerTubeServer } from './server'
async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDelayed = false) {
async function waitJobs (
serversArg: PeerTubeServer[] | PeerTubeServer,
options: {
skipDelayed?: boolean // default false
} = {}
) {
const { skipDelayed = false } = options
const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT
? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10)
: 250