discourse/config/initializers/sidekiq.rb
Régis Hanol 239cbd2d58 enforce coding convention
replaced every `and` by `&&` and every `or` by `||`
2013-03-05 01:42:44 +01:00

16 lines
No EOL
408 B
Ruby

require "#{Rails.root}/lib/discourse_redis"
$redis = DiscourseRedis.new
if Rails.env.development? && !ENV['DO_NOT_FLUSH_REDIS']
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