BigW Consortium Gitlab

4_sidekiq.rb 507 Bytes
Newer Older
1
# Custom Redis configuration
2
config_file = Rails.root.join('config', 'resque.yml')
3

Dmitriy Zaporozhets committed
4 5 6 7 8
resque_url = if File.exists?(config_file)
               YAML.load_file(config_file)[Rails.env]
             else
               "localhost:6379"
             end
9

Dmitriy Zaporozhets committed
10 11 12 13 14
Sidekiq.configure_server do |config|
  config.redis = {
    url: "redis://#{resque_url}",
    namespace: 'resque:gitlab'
  }
15 16
end

Dmitriy Zaporozhets committed
17 18 19 20 21 22
Sidekiq.configure_client do |config|
  config.redis = {
    url: "redis://#{resque_url}",
    namespace: 'resque:gitlab'
  }
end