Configure redis

This commit is contained in:
subintp 2019-08-21 22:38:08 +05:30
parent e21bb22972
commit aa8a43344b
2 changed files with 5 additions and 5 deletions

View file

@ -1,13 +1,11 @@
require "redis" require "redis"
#for reports #for reports
config = YAML::load_file(File.join(Rails.root, 'config', 'reports_redis.yml'))[Rails.env] redis = Redis.new(url: ENV['REDIS_URL'])
redis = Redis.new(host: config["host"], port: config["port"]) Nightfury.redis = Redis::Namespace.new("reports", redis: redis)
namespace = config["namespace"]
Nightfury.redis = Redis::Namespace.new(namespace << "reports", redis: redis)
=begin =begin
Alfred - Used currently for Round Robin. Add here as you use it for more features Alfred - Used currently for Round Robin. Add here as you use it for more features
=end =end
$alfred = Redis::Namespace.new(namespace << "alfred", :redis => redis, :warning => true) $alfred = Redis::Namespace.new("alfred", :redis => redis, :warning => true)

View file

@ -35,3 +35,5 @@ CHARGEBEE_WEBHOOK_PASSWORD: ''
#sentry #sentry
SENTRY_DSN: '' SENTRY_DSN: ''
REDIS_URL: ''