Merge branch 'release/1.4.0' into develop

This commit is contained in:
Chocobozzz
2019-09-05 10:19:35 +02:00
7 changed files with 19 additions and 17 deletions

View File

@@ -261,7 +261,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.loadOldestLocalExpired(redundancy.strategy, redundancy.minLifetime)
if (!toDelete) return