aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/redundancy.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-10 10:11:28 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-01-28 11:35:26 +0100
commitb764380ac23f4e9d4677d08acdc3474c2931a16d (patch)
tree0d2c440ed8b56c35e47f2274586a11da63852086 /server/lib/redundancy.ts
parent3ae0bbd23c6f1b2790975328d8eae6a8317c223d (diff)
downloadPeerTube-b764380ac23f4e9d4677d08acdc3474c2931a16d.tar.gz
PeerTube-b764380ac23f4e9d4677d08acdc3474c2931a16d.tar.zst
PeerTube-b764380ac23f4e9d4677d08acdc3474c2931a16d.zip
Add ability to list redundancies
Diffstat (limited to 'server/lib/redundancy.ts')
-rw-r--r--server/lib/redundancy.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/redundancy.ts b/server/lib/redundancy.ts
index 1b4ecd7c0..78d84e02e 100644
--- a/server/lib/redundancy.ts
+++ b/server/lib/redundancy.ts
@@ -13,10 +13,10 @@ async function removeVideoRedundancy (videoRedundancy: MVideoRedundancyVideo, t?
13 await videoRedundancy.destroy({ transaction: t }) 13 await videoRedundancy.destroy({ transaction: t })
14} 14}
15 15
16async function removeRedundancyOf (serverId: number) { 16async function removeRedundanciesOfServer (serverId: number) {
17 const videosRedundancy = await VideoRedundancyModel.listLocalOfServer(serverId) 17 const redundancies = await VideoRedundancyModel.listLocalOfServer(serverId)
18 18
19 for (const redundancy of videosRedundancy) { 19 for (const redundancy of redundancies) {
20 await removeVideoRedundancy(redundancy) 20 await removeVideoRedundancy(redundancy)
21 } 21 }
22} 22}
@@ -24,6 +24,6 @@ async function removeRedundancyOf (serverId: number) {
24// --------------------------------------------------------------------------- 24// ---------------------------------------------------------------------------
25 25
26export { 26export {
27 removeRedundancyOf, 27 removeRedundanciesOfServer,
28 removeVideoRedundancy 28 removeVideoRedundancy
29} 29}