Heroku, concurrency , Procfile sidekiq.rb:
Sidekiq.configure_server do |config|
config.options[:concurrency] = (ENV['SIDEKIQ_WORKERS_PROCFILE'] || ENV['SIDEKIQ_WORKERS'] || 1).to_i
...
end
SIDEKIQ_WORKERS_PROCFILE Procfile - SIDEKIQ_WORKERS, Heroku.
, .
, Heroku, dyno.. - sidekiq concurrency, dynos - , .
Procfile :
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
default: env HEROKU_PROCESS=default bundle exec sidekiq -c 5
important: env HEROKU_PROCESS=important bundle exec sidekiq -q important -c 5
instant: env HEROKU_PROCESS=instant bundle exec sidekiq -q instant -c 5
matrices: env HEROKU_PROCESS=matrices SIDEKIQ_CONCURRENCY=1 bundle exec sidekiq -q matrices -c 1
, matrices SIDEKIQ_CONCURRENCY, 1 - concurrency. sidekiq.rb. , -c 1 - , .
.
sidekiq , matrices 1 , - 3 ( SIDEKIQ_WORKER 3 Heroku):
