Fix bug in redundancy eviction
This commit is contained in:
parent
f01dc977ae
commit
f8278b9605
|
@ -241,7 +241,7 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
|
|||
}
|
||||
|
||||
private async purgeCacheIfNeeded (candidateToDuplicate: CandidateToDuplicate) {
|
||||
while (this.isTooHeavy(candidateToDuplicate)) {
|
||||
while (await this.isTooHeavy(candidateToDuplicate)) {
|
||||
const redundancy = candidateToDuplicate.redundancy
|
||||
const toDelete = await VideoRedundancyModel.loadOldestLocalThatAlreadyExpired(redundancy.strategy, redundancy.minLifetime)
|
||||
if (!toDelete) return
|
||||
|
|
Loading…
Reference in New Issue