diff options
Diffstat (limited to 'shared')
-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 |