mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix server redundancy tests
This commit is contained in:
@@ -185,11 +185,12 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
|
||||
}
|
||||
|
||||
private async isTooHeavy (redundancy: VideosRedundancy, filesToDuplicate: VideoFileModel[]) {
|
||||
const maxSize = redundancy.size - this.getTotalFileSizes(filesToDuplicate)
|
||||
const maxSize = redundancy.size
|
||||
|
||||
const totalDuplicated = await VideoRedundancyModel.getTotalDuplicated(redundancy.strategy)
|
||||
const totalWillDuplicate = totalDuplicated + this.getTotalFileSizes(filesToDuplicate)
|
||||
|
||||
return totalDuplicated > maxSize
|
||||
return totalWillDuplicate > maxSize
|
||||
}
|
||||
|
||||
private buildNewExpiration (expiresAfterMs: number) {
|
||||
|
||||
Reference in New Issue
Block a user