2013-02-05 14:16:51 -05:00
|
|
|
require "#{Rails.root}/lib/discourse_redis"
|
|
|
|
|
|
|
|
$redis = DiscourseRedis.new
|
|
|
|
|
2013-03-04 19:42:44 -05:00
|
|
|
if Rails.env.development? && !ENV['DO_NOT_FLUSH_REDIS']
|
2013-02-05 14:16:51 -05:00
|
|
|
puts "Flushing redis (development mode)"
|
|
|
|
$redis.flushall
|
|
|
|
end
|
|
|
|
|
|
|
|
Sidekiq.configure_server do |config|
|
|
|
|
config.redis = { :url => $redis.url, :namespace => 'sidekiq' }
|
|
|
|
end
|
|
|
|
|
|
|
|
Sidekiq.configure_client do |config|
|
|
|
|
config.redis = { :url => $redis.url, :namespace => 'sidekiq' }
|
|
|
|
end
|