diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-04 15:29:34 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-05-09 08:57:34 +0200 |
commit | 5e47f6ab984a7d00782e4c7030afffa1ba480add (patch) | |
tree | 1ce586b591a8d71acbc301eba29b9a5e6490439e /shared/server-commands/runners | |
parent | 6a4905602636afd6650c9e6f4d0fcc2105d91100 (diff) | |
download | PeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.tar.gz PeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.tar.zst PeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.zip |
Support studio transcoding in peertube runner
Diffstat (limited to 'shared/server-commands/runners')
-rw-r--r-- | shared/server-commands/runners/runner-jobs-command.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/shared/server-commands/runners/runner-jobs-command.ts b/shared/server-commands/runners/runner-jobs-command.ts index 3b0f84b9d..26dbef77a 100644 --- a/shared/server-commands/runners/runner-jobs-command.ts +++ b/shared/server-commands/runners/runner-jobs-command.ts | |||
@@ -200,7 +200,7 @@ export class RunnerJobsCommand extends AbstractCommand { | |||
200 | }) | 200 | }) |
201 | } | 201 | } |
202 | 202 | ||
203 | getInputFile (options: OverrideCommandOptions & { url: string, jobToken: string, runnerToken: string }) { | 203 | getJobFile (options: OverrideCommandOptions & { url: string, jobToken: string, runnerToken: string }) { |
204 | const { host, protocol, pathname } = new URL(options.url) | 204 | const { host, protocol, pathname } = new URL(options.url) |
205 | 205 | ||
206 | return this.postBodyRequest({ | 206 | return this.postBodyRequest({ |
@@ -249,8 +249,15 @@ export class RunnerJobsCommand extends AbstractCommand { | |||
249 | 249 | ||
250 | const { data } = await this.list({ count: 100 }) | 250 | const { data } = await this.list({ count: 100 }) |
251 | 251 | ||
252 | const allowedStates = new Set<RunnerJobState>([ | ||
253 | RunnerJobState.PENDING, | ||
254 | RunnerJobState.PROCESSING, | ||
255 | RunnerJobState.WAITING_FOR_PARENT_JOB | ||
256 | ]) | ||
257 | |||
252 | for (const job of data) { | 258 | for (const job of data) { |
253 | if (state && job.state.id !== state) continue | 259 | if (state && job.state.id !== state) continue |
260 | else if (allowedStates.has(job.state.id) !== true) continue | ||
254 | 261 | ||
255 | await this.cancelByAdmin({ jobUUID: job.uuid }) | 262 | await this.cancelByAdmin({ jobUUID: job.uuid }) |
256 | } | 263 | } |