From 9129b7694d577322327ee79e9b9aa64deee92765 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 8 Feb 2021 10:51:10 +0100 Subject: Allow to specify transcoding and import jobs concurrency --- server/tests/api/check-params/config.ts | 2 ++ server/tests/api/server/config.ts | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'server/tests') diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index d6c20f7af..c7eb3189b 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts @@ -86,6 +86,7 @@ describe('Test config API validators', function () { enabled: true, allowAdditionalExtensions: true, allowAudioFiles: true, + concurrency: 1, threads: 1, profile: 'vod_profile', resolutions: { @@ -130,6 +131,7 @@ describe('Test config API validators', function () { }, import: { videos: { + concurrency: 1, http: { enabled: false }, diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index 26df8373e..b2371614f 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts @@ -70,6 +70,7 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) { expect(data.transcoding.allowAdditionalExtensions).to.be.false expect(data.transcoding.allowAudioFiles).to.be.false expect(data.transcoding.threads).to.equal(2) + expect(data.transcoding.concurrency).to.equal(2) expect(data.transcoding.profile).to.equal('default') expect(data.transcoding.resolutions['240p']).to.be.true expect(data.transcoding.resolutions['360p']).to.be.true @@ -97,6 +98,7 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) { expect(data.live.transcoding.resolutions['1440p']).to.be.false expect(data.live.transcoding.resolutions['2160p']).to.be.false + expect(data.import.videos.concurrency).to.equal(2) expect(data.import.videos.http.enabled).to.be.true expect(data.import.videos.torrent.enabled).to.be.true expect(data.autoBlacklist.videos.ofUsers.enabled).to.be.false @@ -159,6 +161,7 @@ function checkUpdatedConfig (data: CustomConfig) { expect(data.transcoding.enabled).to.be.true expect(data.transcoding.threads).to.equal(1) + expect(data.transcoding.concurrency).to.equal(3) expect(data.transcoding.allowAdditionalExtensions).to.be.true expect(data.transcoding.allowAudioFiles).to.be.true expect(data.transcoding.profile).to.equal('vod_profile') @@ -186,6 +189,7 @@ function checkUpdatedConfig (data: CustomConfig) { expect(data.live.transcoding.resolutions['1080p']).to.be.true expect(data.live.transcoding.resolutions['2160p']).to.be.true + expect(data.import.videos.concurrency).to.equal(4) expect(data.import.videos.http.enabled).to.be.false expect(data.import.videos.torrent.enabled).to.be.false expect(data.autoBlacklist.videos.ofUsers.enabled).to.be.true @@ -323,6 +327,7 @@ describe('Test config', function () { allowAdditionalExtensions: true, allowAudioFiles: true, threads: 1, + concurrency: 3, profile: 'vod_profile', resolutions: { '0p': false, @@ -364,6 +369,7 @@ describe('Test config', function () { }, import: { videos: { + concurrency: 4, http: { enabled: false }, -- cgit v1.2.3