From 851675c5591dcab1070183f0ed1b1a788de07d2c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Aug 2021 15:13:41 +0200 Subject: Rename jobs list command --- shared/extra-utils/server/jobs-command.ts | 4 ++-- shared/extra-utils/server/jobs.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'shared/extra-utils') 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 { async getLatest (options: OverrideCommandOptions & { jobType: JobType }) { - const { data } = await this.getJobsList({ ...options, start: 0, count: 1, sort: '-createdAt' }) + const { data } = await this.list({ ...options, start: 0, count: 1, sort: '-createdAt' }) if (data.length === 0) return undefined return data[0] } - getJobsList (options: OverrideCommandOptions & { + list (options: OverrideCommandOptions & { state?: JobState jobType?: JobType 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 // Check if each server has pending request for (const server of servers) { for (const state of states) { - const p = server.jobs.getJobsList({ + const p = server.jobs.list({ state, start: 0, count: 10, -- cgit v1.2.3