diff options
author | Pierre GUINOISEAU <pierre@guinoiseau.eu> | 2013-03-06 22:06:12 +0100 |
---|---|---|
committer | Pierre GUINOISEAU <pierre@guinoiseau.eu> | 2013-03-06 22:06:12 +0100 |
commit | 67a61c80d161582aefae82a6784356c910940751 (patch) | |
tree | 1e1cbb604637c9ef501c44cce004447aef04d67a /config | |
parent | 7b38a0de9878b9b0214879e9def32c285e149808 (diff) | |
download | gitlab-ce-67a61c80d161582aefae82a6784356c910940751.tar.gz |
Allow connection to Redis via unix socket
Allow connection to Redis via unix socket, using
unix:/var/run/redis/redis.sock for example.
Default behaviour does not change, except that the full Redis URL must
be configured, with redis:// for tcp or unix: for unix socket.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/4_sidekiq.rb | 6 | ||||
-rw-r--r-- | config/resque.yml.example | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/config/initializers/4_sidekiq.rb b/config/initializers/4_sidekiq.rb index 6abe6e74fa0..c90d376273d 100644 --- a/config/initializers/4_sidekiq.rb +++ b/config/initializers/4_sidekiq.rb @@ -4,19 +4,19 @@ config_file = Rails.root.join('config', 'resque.yml') resque_url = if File.exists?(config_file) YAML.load_file(config_file)[Rails.env] else - "localhost:6379" + "redis://localhost:6379" end Sidekiq.configure_server do |config| config.redis = { - url: "redis://#{resque_url}", + url: resque_url, namespace: 'resque:gitlab' } end Sidekiq.configure_client do |config| config.redis = { - url: "redis://#{resque_url}", + url: resque_url, namespace: 'resque:gitlab' } end diff --git a/config/resque.yml.example b/config/resque.yml.example index cd3d487408a..3c7ad0e5778 100644 --- a/config/resque.yml.example +++ b/config/resque.yml.example @@ -1,3 +1,3 @@ -development: localhost:6379 -test: localhost:6379 -production: redis.example.com:6379 +development: redis://localhost:6379 +test: redis://localhost:6379 +production: redis://redis.example.com:6379 |