aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/redundancy/video-redundancy.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-26 11:01:59 +0200
committerChocobozzz <me@florianbigard.com>2021-08-26 11:02:41 +0200
commit52b1fd15fa9e2cc04873ad606e789929579483f2 (patch)
treed270a71715af407cc93771a39014f62facf710df /server/models/redundancy/video-redundancy.ts
parent7b6cf83e33c1cf9719f77338288b9145b8cdcf60 (diff)
downloadPeerTube-52b1fd15fa9e2cc04873ad606e789929579483f2.tar.gz
PeerTube-52b1fd15fa9e2cc04873ad606e789929579483f2.tar.zst
PeerTube-52b1fd15fa9e2cc04873ad606e789929579483f2.zip
Better logs for redundancy
Diffstat (limited to 'server/models/redundancy/video-redundancy.ts')
-rw-r--r--server/models/redundancy/video-redundancy.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index 44c17f8e5..529977924 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -411,7 +411,7 @@ export class VideoRedundancyModel extends Model<Partial<AttributesOnly<VideoRedu
411 return VideoRedundancyModel.scope([ ScopeNames.WITH_VIDEO ]).findOne(query) 411 return VideoRedundancyModel.scope([ ScopeNames.WITH_VIDEO ]).findOne(query)
412 } 412 }
413 413
414 static async listLocalExpired () { 414 static async listLocalExpired (): Promise<MVideoRedundancyVideo[]> {
415 const actor = await getServerActor() 415 const actor = await getServerActor()
416 416
417 const query = { 417 const query = {
@@ -701,6 +701,13 @@ export class VideoRedundancyModel extends Model<Partial<AttributesOnly<VideoRedu
701 return undefined 701 return undefined
702 } 702 }
703 703
704 getVideoUUID () {
705 const video = this.getVideo()
706 if (!video) return undefined
707
708 return video.uuid
709 }
710
704 isOwned () { 711 isOwned () {
705 return !!this.strategy 712 return !!this.strategy
706 } 713 }