diff options
Diffstat (limited to 'shared/extra-utils/server/jobs.ts')
-rw-r--r-- | shared/extra-utils/server/jobs.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts index 754530977..64a0353eb 100644 --- a/shared/extra-utils/server/jobs.ts +++ b/shared/extra-utils/server/jobs.ts | |||
@@ -1,17 +1,17 @@ | |||
1 | 1 | ||
2 | import { JobState } from '../../models' | 2 | import { JobState } from '../../models' |
3 | import { wait } from '../miscs' | 3 | import { wait } from '../miscs' |
4 | import { ServerInfo } from './servers' | 4 | import { PeerTubeServer } from './server' |
5 | 5 | ||
6 | async function waitJobs (serversArg: ServerInfo[] | ServerInfo) { | 6 | async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer) { |
7 | const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT | 7 | const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT |
8 | ? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10) | 8 | ? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10) |
9 | : 250 | 9 | : 250 |
10 | 10 | ||
11 | let servers: ServerInfo[] | 11 | let servers: PeerTubeServer[] |
12 | 12 | ||
13 | if (Array.isArray(serversArg) === false) servers = [ serversArg as ServerInfo ] | 13 | if (Array.isArray(serversArg) === false) servers = [ serversArg as PeerTubeServer ] |
14 | else servers = serversArg as ServerInfo[] | 14 | else servers = serversArg as PeerTubeServer[] |
15 | 15 | ||
16 | const states: JobState[] = [ 'waiting', 'active', 'delayed' ] | 16 | const states: JobState[] = [ 'waiting', 'active', 'delayed' ] |
17 | const repeatableJobs = [ 'videos-views', 'activitypub-cleaner' ] | 17 | const repeatableJobs = [ 'videos-views', 'activitypub-cleaner' ] |