mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 01:39:37 +02:00
Add WatchDog for stalled Transcription jobs
This commit is contained in:
parent
37e13bbcd2
commit
cdb861a26a
3 changed files with 9 additions and 2 deletions
|
@ -455,6 +455,7 @@ remote_runners:
|
|||
stalled_jobs:
|
||||
live: '30 seconds'
|
||||
vod: '2 minutes'
|
||||
transcription: '2 minutes'
|
||||
|
||||
thumbnails:
|
||||
# When automatically generating a thumbnail from the video
|
||||
|
|
|
@ -442,7 +442,8 @@ const CONFIG = {
|
|||
REMOTE_RUNNERS: {
|
||||
STALLED_JOBS: {
|
||||
LIVE: parseDurationToMs(config.get<string>('remote_runners.stalled_jobs.live')),
|
||||
VOD: parseDurationToMs(config.get<string>('remote_runners.stalled_jobs.vod'))
|
||||
VOD: parseDurationToMs(config.get<string>('remote_runners.stalled_jobs.vod')),
|
||||
TRANSCRIPTION: parseDurationToMs(config.get<string>('remote_runners.stalled_jobs.transcription'))
|
||||
}
|
||||
},
|
||||
THUMBNAILS: {
|
||||
|
|
|
@ -28,7 +28,12 @@ export class RunnerJobWatchDogScheduler extends AbstractScheduler {
|
|||
types: [ 'live-rtmp-hls-transcoding' ]
|
||||
})
|
||||
|
||||
for (const stalled of [ ...vodStalledJobs, ...liveStalledJobs ]) {
|
||||
const transcriptionStalledJobs = await RunnerJobModel.listStalledJobs({
|
||||
staleTimeMS: CONFIG.REMOTE_RUNNERS.STALLED_JOBS.TRANSCRIPTION,
|
||||
types: [ 'video-transcription' ]
|
||||
})
|
||||
|
||||
for (const stalled of [ ...vodStalledJobs, ...liveStalledJobs, ...transcriptionStalledJobs ]) {
|
||||
logger.info('Abort stalled runner job %s (%s)', stalled.uuid, stalled.type, lTags(stalled.uuid, stalled.type))
|
||||
|
||||
const Handler = getRunnerJobHandlerClass(stalled)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue