Commit 52bf5b0e78edeb1acc8254b00ba164d48a88f39e
Exists in
master
and in
4 other branches
Merge pull request #3159 from peikk0/allow-redis-via-socket
Allow connection to Redis via unix socket
Showing
3 changed files
with
7 additions
and
7 deletions
Show diff stats
config/initializers/4_sidekiq.rb
| ... | ... | @@ -4,19 +4,19 @@ config_file = Rails.root.join('config', 'resque.yml') |
| 4 | 4 | resque_url = if File.exists?(config_file) |
| 5 | 5 | YAML.load_file(config_file)[Rails.env] |
| 6 | 6 | else |
| 7 | - "localhost:6379" | |
| 7 | + "redis://localhost:6379" | |
| 8 | 8 | end |
| 9 | 9 | |
| 10 | 10 | Sidekiq.configure_server do |config| |
| 11 | 11 | config.redis = { |
| 12 | - url: "redis://#{resque_url}", | |
| 12 | + url: resque_url, | |
| 13 | 13 | namespace: 'resque:gitlab' |
| 14 | 14 | } |
| 15 | 15 | end |
| 16 | 16 | |
| 17 | 17 | Sidekiq.configure_client do |config| |
| 18 | 18 | config.redis = { |
| 19 | - url: "redis://#{resque_url}", | |
| 19 | + url: resque_url, | |
| 20 | 20 | namespace: 'resque:gitlab' |
| 21 | 21 | } |
| 22 | 22 | end | ... | ... |
config/resque.yml.example
doc/install/installation.md
| ... | ... | @@ -288,7 +288,7 @@ a different host, you can configure its connection string via the |
| 288 | 288 | `config/resque.yml` file. |
| 289 | 289 | |
| 290 | 290 | # example |
| 291 | - production: redis.example.tld:6379 | |
| 291 | + production: redis://redis.example.tld:6379 | |
| 292 | 292 | |
| 293 | 293 | ## Custom SSH Connection |
| 294 | 294 | ... | ... |