X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fredis.ts;h=158f3c08090e7106c165847cdac9c49ae14e4cfb;hb=aa2ce188d102ab38452df316d06286040b5d9075;hp=b86aefa0ebba99f7f538f719d09fc5067b335b79;hpb=b211106695bb82f6c32e53306081b5262c3d109d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/redis.ts b/server/lib/redis.ts index b86aefa0e..158f3c080 100644 --- a/server/lib/redis.ts +++ b/server/lib/redis.ts @@ -145,18 +145,10 @@ class Redis { return this.setValue(this.generateIPViewKey(ip, videoUUID), '1', VIEW_LIFETIME.VIEW) } - setIPVideoViewer (ip: string, videoUUID: string) { - return this.setValue(this.generateIPViewerKey(ip, videoUUID), '1', VIEW_LIFETIME.VIEWER) - } - async doesVideoIPViewExist (ip: string, videoUUID: string) { return this.exists(this.generateIPViewKey(ip, videoUUID)) } - async doesVideoIPViewerExist (ip: string, videoUUID: string) { - return this.exists(this.generateIPViewerKey(ip, videoUUID)) - } - /* ************ Tracker IP block ************ */ setTrackerBlockIP (ip: string) { @@ -316,7 +308,7 @@ class Redis { return this.deleteKey('resumable-upload-' + uploadId) } - /* ************ AP ressource unavailability ************ */ + /* ************ AP resource unavailability ************ */ async addAPUnavailability (url: string) { const key = this.generateAPUnavailabilityKey(url) @@ -361,10 +353,6 @@ class Redis { return `views-${videoUUID}-${ip}` } - private generateIPViewerKey (ip: string, videoUUID: string) { - return `viewer-${videoUUID}-${ip}` - } - private generateTrackerBlockIPKey (ip: string) { return `tracker-block-ip-${ip}` }