aboutsummaryrefslogtreecommitdiffhomepage
path: root/packages/peertube-runner
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-22 13:44:22 +0200
committerChocobozzz <me@florianbigard.com>2023-05-22 13:54:46 +0200
commit17ecdf61ce1d374cc8ba17601b93c9bda08112b2 (patch)
treed3405d11636f661815c3ad09821944a5ae26ebfa /packages/peertube-runner
parentf3bc1b541619673f14db7de220b9c520a4f35ca8 (diff)
downloadPeerTube-17ecdf61ce1d374cc8ba17601b93c9bda08112b2.tar.gz
PeerTube-17ecdf61ce1d374cc8ba17601b93c9bda08112b2.tar.zst
PeerTube-17ecdf61ce1d374cc8ba17601b93c9bda08112b2.zip
Force stop remote live transcoding
Diffstat (limited to 'packages/peertube-runner')
-rw-r--r--packages/peertube-runner/server/process/shared/process-live.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/peertube-runner/server/process/shared/process-live.ts b/packages/peertube-runner/server/process/shared/process-live.ts
index df1b677f0..6edb1f1e9 100644
--- a/packages/peertube-runner/server/process/shared/process-live.ts
+++ b/packages/peertube-runner/server/process/shared/process-live.ts
@@ -34,6 +34,8 @@ export class ProcessLiveRTMPHLSTranscoding {
34 34
35 constructor (private readonly options: ProcessOptions<RunnerJobLiveRTMPHLSTranscodingPayload>) { 35 constructor (private readonly options: ProcessOptions<RunnerJobLiveRTMPHLSTranscodingPayload>) {
36 this.outputPath = join(ConfigManager.Instance.getTranscodingDirectory(), buildUUID()) 36 this.outputPath = join(ConfigManager.Instance.getTranscodingDirectory(), buildUUID())
37
38 logger.debug(`Using ${this.outputPath} to process live rtmp hls transcoding job ${options.job.uuid}`)
37 } 39 }
38 40
39 process () { 41 process () {
@@ -289,6 +291,7 @@ export class ProcessLiveRTMPHLSTranscoding {
289 }) 291 })
290 } catch (err) { 292 } catch (err) {
291 if (currentTry >= 3) throw err 293 if (currentTry >= 3) throw err
294 if ((err.res?.body as PeerTubeProblemDocument)?.code === ServerErrorCode.RUNNER_JOB_NOT_IN_PROCESSING_STATE) throw err
292 295
293 logger.warn({ err }, 'Will retry update after error') 296 logger.warn({ err }, 'Will retry update after error')
294 await wait(250) 297 await wait(250)
@@ -310,6 +313,8 @@ export class ProcessLiveRTMPHLSTranscoding {
310 // --------------------------------------------------------------------------- 313 // ---------------------------------------------------------------------------
311 314
312 private cleanup () { 315 private cleanup () {
316 logger.debug(`Cleaning up job ${this.options.job.uuid}`)
317
313 for (const fsWatcher of this.fsWatchers) { 318 for (const fsWatcher of this.fsWatchers) {
314 fsWatcher.close() 319 fsWatcher.close()
315 .catch(err => logger.error({ err }, 'Cannot close watcher')) 320 .catch(err => logger.error({ err }, 'Cannot close watcher'))