Skip to content

Commit

Permalink
Merged in feature/fix_sidekiq_bug (pull request #18)
Browse files Browse the repository at this point in the history
KBP-168 #time 3m - Fix sidekiq bug

Approved-by: Fatih Avsan <[email protected]>
Approved-by: Eşref VİDUŞLU <[email protected]>
  • Loading branch information
Hamdi Bayhan committed Nov 13, 2017
2 parents 571b1e4 + 6be2865 commit f83a9d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions templates/sidekiq/sidekiq.rb.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
require 'sidekiq'
require 'sidekiq/web'

Rails.application.config.active_job.queue_adapter = :sidekiq

namespace = "<%= app_name.parameterize %>_#{Rails.env}"
settings = {
url: ENV['REDIS_URL'] || 'redis://localhost:6379/0',
url: ENV['REDISTOGO_URL'] || 'redis://localhost:6379/0',
namespace: namespace
}

Sidekiq.configure_server { |config| config.redis = settings }
Sidekiq.configure_client { |config| config.redis = settings }
Sidekiq.options[:labels] << namespace

Rails.application.config.active_job.queue_adapter = :sidekiq

# Open this if you have scheduled jobs
# schedule_file = 'config/sidekiq_schedule.yml'
# if File.exists?(schedule_file) && Sidekiq.server?
Expand Down
7 changes: 3 additions & 4 deletions templates/sidekiq/sidekiq.yml.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
:concurrency: 25
:pidfile: ./tmp/pids/sidekiq.pid
:logfile: ./log/sidekiq.log
:queues:
- default
- mailers
- low_priority
- [high_priority, 2]
staging:
:concurrency: 10
:concurrency: 3
:logfile: ./log/staging.log
production:
:concurrency: 25
:logfile: ./log/production.log
development:
:concurrency: 10
:pidfile: ./tmp/pids/sidekiq.pid
:logfile: ./log/development.log
test:
:pidfile: ./tmp/pids/sidekiq_test.pid
Expand Down

0 comments on commit f83a9d1

Please sign in to comment.