diff options
Diffstat (limited to 'shared/extra-utils/server/jobs.ts')
-rw-r--r-- | shared/extra-utils/server/jobs.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts index 692b5e24d..11b570f60 100644 --- a/shared/extra-utils/server/jobs.ts +++ b/shared/extra-utils/server/jobs.ts | |||
@@ -2,6 +2,7 @@ import * as request from 'supertest' | |||
2 | import { Job, JobState } from '../../models' | 2 | import { Job, JobState } from '../../models' |
3 | import { wait } from '../miscs/miscs' | 3 | import { wait } from '../miscs/miscs' |
4 | import { ServerInfo } from './servers' | 4 | import { ServerInfo } from './servers' |
5 | import { inspect } from 'util' | ||
5 | 6 | ||
6 | function getJobsList (url: string, accessToken: string, state: JobState) { | 7 | function getJobsList (url: string, accessToken: string, state: JobState) { |
7 | const path = '/api/v1/jobs/' + state | 8 | const path = '/api/v1/jobs/' + state |
@@ -49,7 +50,9 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) { | |||
49 | .then(res => res.body.data) | 50 | .then(res => res.body.data) |
50 | .then((jobs: Job[]) => jobs.filter(j => j.type !== 'videos-views')) | 51 | .then((jobs: Job[]) => jobs.filter(j => j.type !== 'videos-views')) |
51 | .then(jobs => { | 52 | .then(jobs => { |
52 | if (jobs.length !== 0) pendingRequests = true | 53 | if (jobs.length !== 0) { |
54 | pendingRequests = true | ||
55 | } | ||
53 | }) | 56 | }) |
54 | tasks.push(p) | 57 | tasks.push(p) |
55 | } | 58 | } |