aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/server-commands/server/jobs.ts9
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'
4import { JobState, JobType } from '../../models' 4import { JobState, JobType } from '../../models'
5import { PeerTubeServer } from './server' 5import { PeerTubeServer } from './server'
6 6
7async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDelayed = false) { 7async 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