diff options
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r-- | shared/extra-utils/server/jobs-command.ts | 4 | ||||
-rw-r--r-- | shared/extra-utils/server/jobs.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/shared/extra-utils/server/jobs-command.ts b/shared/extra-utils/server/jobs-command.ts index 91771c176..f28397816 100644 --- a/shared/extra-utils/server/jobs-command.ts +++ b/shared/extra-utils/server/jobs-command.ts | |||
@@ -8,14 +8,14 @@ export class JobsCommand extends AbstractCommand { | |||
8 | async getLatest (options: OverrideCommandOptions & { | 8 | async getLatest (options: OverrideCommandOptions & { |
9 | jobType: JobType | 9 | jobType: JobType |
10 | }) { | 10 | }) { |
11 | const { data } = await this.getJobsList({ ...options, start: 0, count: 1, sort: '-createdAt' }) | 11 | const { data } = await this.list({ ...options, start: 0, count: 1, sort: '-createdAt' }) |
12 | 12 | ||
13 | if (data.length === 0) return undefined | 13 | if (data.length === 0) return undefined |
14 | 14 | ||
15 | return data[0] | 15 | return data[0] |
16 | } | 16 | } |
17 | 17 | ||
18 | getJobsList (options: OverrideCommandOptions & { | 18 | list (options: OverrideCommandOptions & { |
19 | state?: JobState | 19 | state?: JobState |
20 | jobType?: JobType | 20 | jobType?: JobType |
21 | start?: number | 21 | start?: number |
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts index 27104bfdf..79b8c3183 100644 --- a/shared/extra-utils/server/jobs.ts +++ b/shared/extra-utils/server/jobs.ts | |||
@@ -25,7 +25,7 @@ async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDela | |||
25 | // Check if each server has pending request | 25 | // Check if each server has pending request |
26 | for (const server of servers) { | 26 | for (const server of servers) { |
27 | for (const state of states) { | 27 | for (const state of states) { |
28 | const p = server.jobs.getJobsList({ | 28 | const p = server.jobs.list({ |
29 | state, | 29 | state, |
30 | start: 0, | 30 | start: 0, |
31 | count: 10, | 31 | count: 10, |