1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Merge branch 'release/1.4.0' into develop

This commit is contained in:
Chocobozzz 2019-09-05 10:19:35 +02:00
commit 00aab0666c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
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