diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-25 15:13:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-26 10:01:42 +0200 |
commit | 851675c5591dcab1070183f0ed1b1a788de07d2c (patch) | |
tree | 9553ea2d73b5077f3b51345eeca8acbac48b4bd7 /shared/extra-utils/server/jobs-command.ts | |
parent | 0d22b7ad5ffea0a830a266815f7bdfd8893917c9 (diff) | |
download | PeerTube-851675c5591dcab1070183f0ed1b1a788de07d2c.tar.gz PeerTube-851675c5591dcab1070183f0ed1b1a788de07d2c.tar.zst PeerTube-851675c5591dcab1070183f0ed1b1a788de07d2c.zip |
Rename jobs list command
Diffstat (limited to 'shared/extra-utils/server/jobs-command.ts')
-rw-r--r-- | shared/extra-utils/server/jobs-command.ts | 4 |
1 files changed, 2 insertions, 2 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 |