diff options
author | Chocobozzz <me@florianbigard.com> | 2022-10-25 15:01:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-10-25 15:01:51 +0200 |
commit | e82cb08722f076aea4fdfcfa53940e7e4a0ac419 (patch) | |
tree | c333cff4c86a1db7a7f2e796fb63e5c3b66fd95c /shared/server-commands/server | |
parent | 3fc43fa0b0e81ff972526057c9d63e0aaa012aaa (diff) | |
download | PeerTube-e82cb08722f076aea4fdfcfa53940e7e4a0ac419.tar.gz PeerTube-e82cb08722f076aea4fdfcfa53940e7e4a0ac419.tar.zst PeerTube-e82cb08722f076aea4fdfcfa53940e7e4a0ac419.zip |
Fix proxy tests
Diffstat (limited to 'shared/server-commands/server')
-rw-r--r-- | shared/server-commands/server/jobs.ts | 9 |
1 files changed, 8 insertions, 1 deletions
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' | |||
4 | import { JobState, JobType } from '../../models' | 4 | import { JobState, JobType } from '../../models' |
5 | import { PeerTubeServer } from './server' | 5 | import { PeerTubeServer } from './server' |
6 | 6 | ||
7 | async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDelayed = false) { | 7 | async function waitJobs ( |
8 | serversArg: PeerTubeServer[] | PeerTubeServer, | ||
9 | options: { | ||
10 | skipDelayed?: boolean // default false | ||
11 | } = {} | ||
12 | ) { | ||
13 | const { skipDelayed = false } = options | ||
14 | |||
8 | const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT | 15 | const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT |
9 | ? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10) | 16 | ? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10) |
10 | : 250 | 17 | : 250 |