diff options
Diffstat (limited to 'server/lib/redundancy.ts')
-rw-r--r-- | server/lib/redundancy.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/lib/redundancy.ts b/server/lib/redundancy.ts index 16b122658..04d3ded8f 100644 --- a/server/lib/redundancy.ts +++ b/server/lib/redundancy.ts | |||
@@ -12,8 +12,17 @@ async function removeVideoRedundancy (videoRedundancy: VideoRedundancyModel, t?: | |||
12 | await videoRedundancy.destroy({ transaction: t }) | 12 | await videoRedundancy.destroy({ transaction: t }) |
13 | } | 13 | } |
14 | 14 | ||
15 | async function removeRedundancyOf (serverId: number) { | ||
16 | const videosRedundancy = await VideoRedundancyModel.listLocalOfServer(serverId) | ||
17 | |||
18 | for (const redundancy of videosRedundancy) { | ||
19 | await removeVideoRedundancy(redundancy) | ||
20 | } | ||
21 | } | ||
22 | |||
15 | // --------------------------------------------------------------------------- | 23 | // --------------------------------------------------------------------------- |
16 | 24 | ||
17 | export { | 25 | export { |
26 | removeRedundancyOf, | ||
18 | removeVideoRedundancy | 27 | removeVideoRedundancy |
19 | } | 28 | } |