diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-12 08:46:46 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-12 08:46:46 +0200 |
commit | 0b353d1d8a659140d10b8f7bff3f114698c1a715 (patch) | |
tree | 4d6cadfff782baa8ec253898a20849d05f584733 /server/lib/schedulers/videos-redundancy-scheduler.ts | |
parent | e2600d8b261994abbbeb1ff921edaefd267fc122 (diff) | |
download | PeerTube-0b353d1d8a659140d10b8f7bff3f114698c1a715.tar.gz PeerTube-0b353d1d8a659140d10b8f7bff3f114698c1a715.tar.zst PeerTube-0b353d1d8a659140d10b8f7bff3f114698c1a715.zip |
Fix redundancy exceeding the limit
Diffstat (limited to 'server/lib/schedulers/videos-redundancy-scheduler.ts')
-rw-r--r-- | server/lib/schedulers/videos-redundancy-scheduler.ts | 5 |
1 files changed, 4 insertions, 1 deletions
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 { | |||
105 | private async extendsRedundancy (redundancyModel: VideoRedundancyModel) { | 105 | private async extendsRedundancy (redundancyModel: VideoRedundancyModel) { |
106 | const redundancy = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES.find(s => s.strategy === redundancyModel.strategy) | 106 | const redundancy = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES.find(s => s.strategy === redundancyModel.strategy) |
107 | // Redundancy strategy disabled, remove our redundancy instead of extending expiration | 107 | // Redundancy strategy disabled, remove our redundancy instead of extending expiration |
108 | if (!redundancy) await removeVideoRedundancy(redundancyModel) | 108 | if (!redundancy) { |
109 | await removeVideoRedundancy(redundancyModel) | ||
110 | return | ||
111 | } | ||
109 | 112 | ||
110 | await this.extendsExpirationOf(redundancyModel, redundancy.minLifetime) | 113 | await this.extendsExpirationOf(redundancyModel, redundancy.minLifetime) |
111 | } | 114 | } |