diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-19 14:23:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-19 14:31:05 +0100 |
commit | 419b520ca4434d17f3505013174e195c3a316716 (patch) | |
tree | 24dbf663c4e11e970cb780f96e6eb3efe023b222 /shared/server-commands/server | |
parent | 52435e467a0b30175a10af1dd3ae10d7d564d8ae (diff) | |
download | PeerTube-419b520ca4434d17f3505013174e195c3a316716.tar.gz PeerTube-419b520ca4434d17f3505013174e195c3a316716.tar.zst PeerTube-419b520ca4434d17f3505013174e195c3a316716.zip |
Add ability to cancel & delete video imports
Diffstat (limited to 'shared/server-commands/server')
-rw-r--r-- | shared/server-commands/server/jobs-command.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/shared/server-commands/server/jobs-command.ts b/shared/server-commands/server/jobs-command.ts index ac62157d1..b8790ea00 100644 --- a/shared/server-commands/server/jobs-command.ts +++ b/shared/server-commands/server/jobs-command.ts | |||
@@ -14,6 +14,30 @@ export class JobsCommand extends AbstractCommand { | |||
14 | return data[0] | 14 | return data[0] |
15 | } | 15 | } |
16 | 16 | ||
17 | pauseJobQueue (options: OverrideCommandOptions = {}) { | ||
18 | const path = '/api/v1/jobs/pause' | ||
19 | |||
20 | return this.postBodyRequest({ | ||
21 | ...options, | ||
22 | |||
23 | path, | ||
24 | implicitToken: true, | ||
25 | defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 | ||
26 | }) | ||
27 | } | ||
28 | |||
29 | resumeJobQueue (options: OverrideCommandOptions = {}) { | ||
30 | const path = '/api/v1/jobs/resume' | ||
31 | |||
32 | return this.postBodyRequest({ | ||
33 | ...options, | ||
34 | |||
35 | path, | ||
36 | implicitToken: true, | ||
37 | defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 | ||
38 | }) | ||
39 | } | ||
40 | |||
17 | list (options: OverrideCommandOptions & { | 41 | list (options: OverrideCommandOptions & { |
18 | state?: JobState | 42 | state?: JobState |
19 | jobType?: JobType | 43 | jobType?: JobType |