diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-18 14:35:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-18 15:20:57 +0100 |
commit | ad5db1044c8599eaaaa2a578b350777ae996b068 (patch) | |
tree | 3e003cccf021152405d49b21c6c91b703c8ae96c /shared/extra-utils/server | |
parent | b46cf4b920984492df598c1b61179acfc7f6f22e (diff) | |
download | PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.gz PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.zst PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.zip |
Add ability to run transcoding jobs
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r-- | shared/extra-utils/server/jobs-command.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/shared/extra-utils/server/jobs-command.ts b/shared/extra-utils/server/jobs-command.ts index f28397816..6636e7e4d 100644 --- a/shared/extra-utils/server/jobs-command.ts +++ b/shared/extra-utils/server/jobs-command.ts | |||
@@ -36,6 +36,21 @@ export class JobsCommand extends AbstractCommand { | |||
36 | }) | 36 | }) |
37 | } | 37 | } |
38 | 38 | ||
39 | listFailed (options: OverrideCommandOptions & { | ||
40 | jobType?: JobType | ||
41 | }) { | ||
42 | const path = this.buildJobsUrl('failed') | ||
43 | |||
44 | return this.getRequestBody<ResultList<Job>>({ | ||
45 | ...options, | ||
46 | |||
47 | path, | ||
48 | query: { start: 0, count: 50 }, | ||
49 | implicitToken: true, | ||
50 | defaultExpectedStatus: HttpStatusCode.OK_200 | ||
51 | }) | ||
52 | } | ||
53 | |||
39 | private buildJobsUrl (state?: JobState) { | 54 | private buildJobsUrl (state?: JobState) { |
40 | let path = '/api/v1/jobs' | 55 | let path = '/api/v1/jobs' |
41 | 56 | ||