discourse/config/initializers/sidekiq.rb

16 lines
378 B
Ruby
Raw Normal View History

2013-02-05 14:16:51 -05:00
require "#{Rails.root}/lib/discourse_redis"
$redis = DiscourseRedis.new
if Rails.env.development?
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