1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Support studio transcoding in peertube runner

This commit is contained in:
Chocobozzz 2023-05-04 15:29:34 +02:00 committed by Chocobozzz
parent 6a49056026
commit 5e47f6ab98
67 changed files with 1423 additions and 262 deletions

View file

@ -200,7 +200,7 @@ export class RunnerJobsCommand extends AbstractCommand {
})
}
getInputFile (options: OverrideCommandOptions & { url: string, jobToken: string, runnerToken: string }) {
getJobFile (options: OverrideCommandOptions & { url: string, jobToken: string, runnerToken: string }) {
const { host, protocol, pathname } = new URL(options.url)
return this.postBodyRequest({
@ -249,8 +249,15 @@ export class RunnerJobsCommand extends AbstractCommand {
const { data } = await this.list({ count: 100 })
const allowedStates = new Set<RunnerJobState>([
RunnerJobState.PENDING,
RunnerJobState.PROCESSING,
RunnerJobState.WAITING_FOR_PARENT_JOB
])
for (const job of data) {
if (state && job.state.id !== state) continue
else if (allowedStates.has(job.state.id) !== true) continue
await this.cancelByAdmin({ jobUUID: job.uuid })
}

View file

@ -195,6 +195,18 @@ export class ConfigCommand extends AbstractCommand {
})
}
enableRemoteStudio () {
return this.updateExistingSubConfig({
newConfig: {
videoStudio: {
remoteRunners: {
enabled: true
}
}
}
})
}
// ---------------------------------------------------------------------------
enableStudio () {
@ -442,7 +454,10 @@ export class ConfigCommand extends AbstractCommand {
}
},
videoStudio: {
enabled: false
enabled: false,
remoteRunners: {
enabled: false
}
},
import: {
videos: {