From e82cb08722f076aea4fdfcfa53940e7e4a0ac419 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 25 Oct 2022 15:01:51 +0200 Subject: Fix proxy tests --- shared/server-commands/server/jobs.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'shared/server-commands') diff --git a/shared/server-commands/server/jobs.ts b/shared/server-commands/server/jobs.ts index fc65a873b..e1d6cdff4 100644 --- a/shared/server-commands/server/jobs.ts +++ b/shared/server-commands/server/jobs.ts @@ -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 -- cgit v1.2.3