Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmcodes committed May 30, 2020
1 parent a54d1fd commit b983641
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ NGROK_SUBDOMAIN=
REDIS_DB=0
REDIS_PORT=6379
REDIS_TTL=18000
REDIS_URL=redis://localhost
REDIS_URL=redis://localhost:6379/1
SENTRY_DSN=
SIDEKIQ_NAMESPACE=sidekiq_dev
SMTP_DEFAULT_FROM=
Expand Down
12 changes: 8 additions & 4 deletions config/cable.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
default: &default
adapter: redis
url: <%= ENV.fetch("REDIS_URL", "redis://localhost:6379/0") %>

development:
adapter: async
<<: *default
channel_prefix: rubyists_development

test:
adapter: test
adapter: async

production:
adapter: redis
url: <%= ENV.fetch('REDIS_URL') %>/<%= ENV.fetch('REDIS_DB') %>
<<: *default
channel_prefix: rubyists_production
10 changes: 2 additions & 8 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@

# Sidekiq::Extensions.enable_delay!

defaults = {
url: ENV["REDIS_URL"],
db: ENV["REDIS_DB"],
namespace: ENV["SIDEKIQ_NAMESPACE"]
}

Sidekiq.configure_server do |config|
config.redis = defaults.merge(size: 50)
config.redis = {url: ENV["REDIS_URL"], size: ENV.fetch("REDIS_MAX_THREADS", 5).to_i}
end

Sidekiq.configure_client do |config|
config.redis = defaults.merge(size: 10)
config.redis = {url: ENV["REDIS_URL"], size: ENV.fetch("REDIS_MAX_THREADS", 5).to_i}
end

0 comments on commit b983641

Please sign in to comment.