summaryrefslogtreecommitdiff
path: root/config/initializers/sidekiq.rb
diff options
context:
space:
mode:
authorPaul Charlton <techguru@byiq.com>2017-07-11 03:35:47 +0000
committerRobert Speicher <robert@gitlab.com>2017-07-11 03:35:47 +0000
commitcb3b4a15e6913bc28ee2ecaab017a4c3f08c438e (patch)
treedc3915aa94508d76df2480a8e26ec4b33797a320 /config/initializers/sidekiq.rb
parent4daa6da5407d235cbe4f7a787eaa29304446a870 (diff)
downloadgitlab-ce-cb3b4a15e6913bc28ee2ecaab017a4c3f08c438e.tar.gz
Support multiple Redis instances based on queue type
Diffstat (limited to 'config/initializers/sidekiq.rb')
-rw-r--r--config/initializers/sidekiq.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index 3be4cd797aa..a1cc9655319 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -1,12 +1,12 @@
-# Custom Redis configuration
-redis_config_hash = Gitlab::Redis.params
-redis_config_hash[:namespace] = Gitlab::Redis::SIDEKIQ_NAMESPACE
+# Custom Queues configuration
+queues_config_hash = Gitlab::Redis::Queues.params
+queues_config_hash[:namespace] = Gitlab::Redis::Queues::SIDEKIQ_NAMESPACE
# Default is to retry 25 times with exponential backoff. That's too much.
Sidekiq.default_worker_options = { retry: 3 }
Sidekiq.configure_server do |config|
- config.redis = redis_config_hash
+ config.redis = queues_config_hash
config.server_middleware do |chain|
chain.add Gitlab::SidekiqMiddleware::ArgumentsLogger if ENV['SIDEKIQ_LOG_ARGUMENTS']
@@ -54,7 +54,7 @@ Sidekiq.configure_server do |config|
end
Sidekiq.configure_client do |config|
- config.redis = redis_config_hash
+ config.redis = queues_config_hash
config.client_middleware do |chain|
chain.add Gitlab::SidekiqStatus::ClientMiddleware