From 0b353d1d8a659140d10b8f7bff3f114698c1a715 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 12 Aug 2019 08:46:46 +0200 Subject: Fix redundancy exceeding the limit --- server/lib/schedulers/videos-redundancy-scheduler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/lib/schedulers') diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts index 90caed96d..04f601bfb 100644 --- a/server/lib/schedulers/videos-redundancy-scheduler.ts +++ b/server/lib/schedulers/videos-redundancy-scheduler.ts @@ -105,7 +105,10 @@ export class VideosRedundancyScheduler extends AbstractScheduler { private async extendsRedundancy (redundancyModel: VideoRedundancyModel) { const redundancy = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES.find(s => s.strategy === redundancyModel.strategy) // Redundancy strategy disabled, remove our redundancy instead of extending expiration - if (!redundancy) await removeVideoRedundancy(redundancyModel) + if (!redundancy) { + await removeVideoRedundancy(redundancyModel) + return + } await this.extendsExpirationOf(redundancyModel, redundancy.minLifetime) } -- cgit v1.2.3