diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-11 11:33:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-11 13:45:39 +0200 |
commit | 6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0 (patch) | |
tree | b47de7efb8c6c611c63a15a971c6125a278f547a /server/lib/redis.ts | |
parent | 2c3abc4fa796555eb7d25f416c4f41ab3e3ad8ca (diff) | |
download | PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.gz PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.zst PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.zip |
Move config in its own file
Diffstat (limited to 'server/lib/redis.ts')
-rw-r--r-- | server/lib/redis.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/redis.ts b/server/lib/redis.ts index d85dbe2b5..a7ec8c9df 100644 --- a/server/lib/redis.ts +++ b/server/lib/redis.ts | |||
@@ -3,12 +3,13 @@ import { createClient, RedisClient } from 'redis' | |||
3 | import { logger } from '../helpers/logger' | 3 | import { logger } from '../helpers/logger' |
4 | import { generateRandomString } from '../helpers/utils' | 4 | import { generateRandomString } from '../helpers/utils' |
5 | import { | 5 | import { |
6 | CONFIG, | ||
7 | CONTACT_FORM_LIFETIME, | 6 | CONTACT_FORM_LIFETIME, |
8 | USER_EMAIL_VERIFY_LIFETIME, | 7 | USER_EMAIL_VERIFY_LIFETIME, |
9 | USER_PASSWORD_RESET_LIFETIME, | 8 | USER_PASSWORD_RESET_LIFETIME, |
10 | VIDEO_VIEW_LIFETIME | 9 | VIDEO_VIEW_LIFETIME, |
10 | WEBSERVER | ||
11 | } from '../initializers' | 11 | } from '../initializers' |
12 | import { CONFIG } from '../initializers/config' | ||
12 | 13 | ||
13 | type CachedRoute = { | 14 | type CachedRoute = { |
14 | body: string, | 15 | body: string, |
@@ -41,7 +42,7 @@ class Redis { | |||
41 | this.client.auth(CONFIG.REDIS.AUTH) | 42 | this.client.auth(CONFIG.REDIS.AUTH) |
42 | } | 43 | } |
43 | 44 | ||
44 | this.prefix = 'redis-' + CONFIG.WEBSERVER.HOST + '-' | 45 | this.prefix = 'redis-' + WEBSERVER.HOST + '-' |
45 | } | 46 | } |
46 | 47 | ||
47 | static getRedisClient () { | 48 | static getRedisClient () { |