ActivityPub-federated video streaming platform using P2P directly in your web browser
feature: db selection in redis
Rigel Kent30c82f0d2e9a
diff --git a/config/default.yaml b/config/default.yamlindex 9956382811..8a177e628d 100644--- a/config/default.yaml+++ b/config/default.yaml@@ -25,6 +25,7 @@ redis:hostname: 'localhost'port: 6379auth: null+ db: 0smtp:hostname: nulldiff --git a/config/production.yaml.example b/config/production.yaml.exampleindex 71344fa35d..51d5c51808 100644--- a/config/production.yaml.example+++ b/config/production.yaml.example@@ -27,6 +27,7 @@ redis:hostname: 'localhost'port: 6379auth: null+ db: 0# SMTP server to send emailssmtp:diff --git a/server/initializers/checker.ts b/server/initializers/checker.tsindex c11dc7a89c..5a9c603b50 100644--- a/server/initializers/checker.ts+++ b/server/initializers/checker.ts@@ -22,7 +22,7 @@ function checkMissedConfig () {'webserver.https', 'webserver.hostname', 'webserver.port','trust_proxy','database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password',- 'redis.hostname', 'redis.port', 'redis.auth',+ 'redis.hostname', 'redis.port', 'redis.auth', 'redis.db','smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address','storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache','log.level',diff --git a/server/initializers/constants.ts b/server/initializers/constants.tsindex 51d2728951..424947590a 100644--- a/server/initializers/constants.ts+++ b/server/initializers/constants.ts@@ -111,7 +111,8 @@ const CONFIG = {REDIS: {HOSTNAME: config.get<string>('redis.hostname'),PORT: config.get<number>('redis.port'),- AUTH: config.get<string>('redis.auth')+ AUTH: config.get<string>('redis.auth'),+ DB: config.get<number>('redis.db')},SMTP: {HOSTNAME: config.get<string>('smtp.hostname'),diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.tsindex acc69ef245..0333464bd6 100644--- a/server/lib/job-queue/job-queue.ts+++ b/server/lib/job-queue/job-queue.ts@@ -56,7 +56,8 @@ class JobQueue {redis: {host: CONFIG.REDIS.HOSTNAME,port: CONFIG.REDIS.PORT,- auth: CONFIG.REDIS.AUTH+ auth: CONFIG.REDIS.AUTH,+ db: CONFIG.REDIS.DB}})diff --git a/server/lib/redis.ts b/server/lib/redis.tsindex 0acb9ff0e4..97ff3598b6 100644--- a/server/lib/redis.ts+++ b/server/lib/redis.ts@@ -26,7 +26,8 @@ class Redis {this.client = createClient({host: CONFIG.REDIS.HOSTNAME,- port: CONFIG.REDIS.PORT+ port: CONFIG.REDIS.PORT,+ db: CONFIG.REDIS.DB})this.client.on('error', err => {