aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-09-04 14:40:29 +0200
committerChocobozzz <me@florianbigard.com>2019-09-04 14:40:39 +0200
commitf8278b96053d42ac46aea17f949325caa03e8a00 (patch)
tree8c8685e9474be9f34369de4d58e13b4ad821a979 /server
parentf01dc977ae3afc152f305cd14cb39c8207cf9ca4 (diff)
downloadPeerTube-f8278b96053d42ac46aea17f949325caa03e8a00.tar.gz
PeerTube-f8278b96053d42ac46aea17f949325caa03e8a00.tar.zst
PeerTube-f8278b96053d42ac46aea17f949325caa03e8a00.zip
Fix bug in redundancy eviction
Diffstat (limited to 'server')
-rw-r--r--server/lib/schedulers/videos-redundancy-scheduler.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index cd70fd851..5f4aad66e 100644
--- a/server/lib/schedulers/videos-redundancy-scheduler.ts
+++ b/server/lib/schedulers/videos-redundancy-scheduler.ts
@@ -241,7 +241,7 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
241 } 241 }
242 242
243 private async purgeCacheIfNeeded (candidateToDuplicate: CandidateToDuplicate) { 243 private async purgeCacheIfNeeded (candidateToDuplicate: CandidateToDuplicate) {
244 while (this.isTooHeavy(candidateToDuplicate)) { 244 while (await this.isTooHeavy(candidateToDuplicate)) {
245 const redundancy = candidateToDuplicate.redundancy 245 const redundancy = candidateToDuplicate.redundancy
246 const toDelete = await VideoRedundancyModel.loadOldestLocalThatAlreadyExpired(redundancy.strategy, redundancy.minLifetime) 246 const toDelete = await VideoRedundancyModel.loadOldestLocalThatAlreadyExpired(redundancy.strategy, redundancy.minLifetime)
247 if (!toDelete) return 247 if (!toDelete) return