2012-09-22 15:23:12 +00:00
|
|
|
# Custom Redis configuration
|
2012-11-20 16:57:45 +00:00
|
|
|
config_file = Rails.root.join('config', 'resque.yml')
|
2012-09-22 15:23:12 +00:00
|
|
|
|
2013-01-09 05:14:05 +00:00
|
|
|
resque_url = if File.exists?(config_file)
|
|
|
|
YAML.load_file(config_file)[Rails.env]
|
|
|
|
else
|
2013-03-06 21:06:12 +00:00
|
|
|
"redis://localhost:6379"
|
2013-01-09 05:14:05 +00:00
|
|
|
end
|
2012-09-22 15:23:12 +00:00
|
|
|
|
2013-01-09 05:14:05 +00:00
|
|
|
Sidekiq.configure_server do |config|
|
|
|
|
config.redis = {
|
2013-03-06 21:06:12 +00:00
|
|
|
url: resque_url,
|
2013-01-09 05:14:05 +00:00
|
|
|
namespace: 'resque:gitlab'
|
|
|
|
}
|
2014-07-03 14:23:41 +00:00
|
|
|
|
|
|
|
config.server_middleware do |chain|
|
|
|
|
chain.add Gitlab::SidekiqMiddleware::ArgumentsLogger
|
|
|
|
end
|
2012-09-22 15:23:12 +00:00
|
|
|
end
|
|
|
|
|
2013-01-09 05:14:05 +00:00
|
|
|
Sidekiq.configure_client do |config|
|
|
|
|
config.redis = {
|
2013-03-06 21:06:12 +00:00
|
|
|
url: resque_url,
|
2013-01-09 05:14:05 +00:00
|
|
|
namespace: 'resque:gitlab'
|
|
|
|
}
|
|
|
|
end
|