ActivityPub-federated video streaming platform using P2P directly in your web browser
Add ability to customize transcription TTL
Chocobozzzcb433377830d
diff --git a/config/default.yaml b/config/default.yamlindex c6c924d3d0..f43646264b 100644--- a/config/default.yaml+++ b/config/default.yaml@@ -783,6 +783,9 @@ video_transcription:# If not provided, PeerTube will automatically download the modelmodel_path: null+ # Increase this value if you plan to transcribe long videos and if your video doesn't have a GPU+ timeout: '6 hours'+# Enable remote runners to transcribe videos# If enabled, your instance won't transcribe the videos itself# At least 1 remote runner must be configured to transcribe your videosdiff --git a/config/production.yaml.example b/config/production.yaml.exampleindex 3b995cd51b..8b5cf6761a 100644--- a/config/production.yaml.example+++ b/config/production.yaml.example@@ -793,6 +793,9 @@ video_transcription:# If not provided, PeerTube will automatically download the modelmodel_path: null+ # Increase this value if you plan to transcribe long videos and if your video doesn't have a GPU+ timeout: '6 hours'+# Enable remote runners to transcribe videos# If enabled, your instance won't transcribe the videos itself# At least 1 remote runner must be configured to transcribe your videosdiff --git a/server/core/initializers/config.ts b/server/core/initializers/config.tsindex 48f08f2602..41d5e89e2a 100644--- a/server/core/initializers/config.ts+++ b/server/core/initializers/config.ts@@ -789,6 +789,9 @@ const CONFIG = {get MODEL_PATH () {return config.get<string>('video_transcription.model_path')},+ get TIMEOUT () {+ return parseDurationToMs(config.get<string>('video_transcription.timeout'))+ },REMOTE_RUNNERS: {get ENABLED () {return config.get<boolean>('video_transcription.remote_runners.enabled')diff --git a/server/core/initializers/constants.ts b/server/core/initializers/constants.tsindex b8d282c973..1f62c442c2 100644--- a/server/core/initializers/constants.ts+++ b/server/core/initializers/constants.ts@@ -284,7 +284,7 @@ export const JOB_TTL: { [id in JobType]: number } = {'federate-video': 60000 * 5, // 5 minutes,'create-user-export': 60000 * 60 * 24, // 24 hours'import-user-archive': 60000 * 60 * 24, // 24 hours- 'video-transcription': 1000 * 3600 * 6 // 6 hours+ 'video-transcription': CONFIG.VIDEO_TRANSCRIPTION.TIMEOUT}export const REPEAT_JOBS: { [id in JobType]?: RepeatOptions } = {'videos-views-stats': {