diff options
Diffstat (limited to 'shared/server-commands')
-rw-r--r-- | shared/server-commands/runners/runner-jobs-command.ts | 9 | ||||
-rw-r--r-- | shared/server-commands/server/config-command.ts | 17 |
2 files changed, 24 insertions, 2 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 | } |
diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts index 9a6e413f2..b94bd2625 100644 --- a/shared/server-commands/server/config-command.ts +++ b/shared/server-commands/server/config-command.ts | |||
@@ -195,6 +195,18 @@ export class ConfigCommand extends AbstractCommand { | |||
195 | }) | 195 | }) |
196 | } | 196 | } |
197 | 197 | ||
198 | enableRemoteStudio () { | ||
199 | return this.updateExistingSubConfig({ | ||
200 | newConfig: { | ||
201 | videoStudio: { | ||
202 | remoteRunners: { | ||
203 | enabled: true | ||
204 | } | ||
205 | } | ||
206 | } | ||
207 | }) | ||
208 | } | ||
209 | |||
198 | // --------------------------------------------------------------------------- | 210 | // --------------------------------------------------------------------------- |
199 | 211 | ||
200 | enableStudio () { | 212 | enableStudio () { |
@@ -442,7 +454,10 @@ export class ConfigCommand extends AbstractCommand { | |||
442 | } | 454 | } |
443 | }, | 455 | }, |
444 | videoStudio: { | 456 | videoStudio: { |
445 | enabled: false | 457 | enabled: false, |
458 | remoteRunners: { | ||
459 | enabled: false | ||
460 | } | ||
446 | }, | 461 | }, |
447 | import: { | 462 | import: { |
448 | videos: { | 463 | videos: { |