Skip to content

Commit

Permalink
namespacing redis_analytics
Browse files Browse the repository at this point in the history
redis analytics does not support Proc namespaces in its redis
connection.

Thus, we need to follow the same procedure as for sidekiq:
cef3620acf154df224746a1563
8ff2b0a4d05d11

Discussion: resque/redis-namespace#75

See also this stackoverflow question:
http://stackoverflow.com/q/40638628/2066546

Please note, this is just an intermediate step. Eventually, we will
move to separate redis server instances.

Internal trello cards:
https://trello.com/c/6xYBRb09/1075-redis-bottleneck
https://trello.com/c/cypH3vmW/896-multitenancy

(cherry picked from commit 9396e36)
  • Loading branch information
fiedl committed Feb 21, 2017
1 parent e81f46f commit 6bbf6b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/initializers/redis_analytics.rb
Expand Up @@ -3,8 +3,7 @@
require_relative '../../app/models/redis_analytics/metrics'

RedisAnalytics.configure do |configuration|
configuration.redis_connection = Redis.new(host: ENV['REDIS_HOST'], port: '6379')
configuration.redis_namespace = "#{::STAGE}_redis_analytics"
configuration.redis_connection = RedisConnectionConfiguration.new(:redis_analytics).to_namespaced_redis

# We only want to track signed in users, not bots et cetera.
#
Expand Down

0 comments on commit 6bbf6b1

Please sign in to comment.