capistrano-sidekiq icon indicating copy to clipboard operation
capistrano-sidekiq copied to clipboard

Get sidekiq_pid value by reading sidekiq_config

Open metavida opened this issue 9 years ago • 0 comments

Currently, even if I specify a pidfile value in my sidekiq.yml file, I'm forced to also set a sidekiq_pid value for capistrano-sidekiq. If I don't set a sidekiq_pid value, capistrano-sidekiq actively tells sidekiq to use capistrano-sidekiq's default pidfile location, ignoring my sidekiq.yml value.

This pull has capistrano-sidekiq pick a pidfile in the following order

  1. A user-set sidekiq_pid value (plus any index number)
  2. If a user sets a sidekiq_config value, any pidfile entry for the current sidekiq_env
  3. If a user sets a sidekiq_config value, any global pidfile entry
  4. The default pidfile location (plus any index number)

This Pull request should also address

  • Issue #134 - because the value from their sidekiq.yml will be honored
  • @edslocomb's problems caused by Pull #116 [1][2]
  • Partially addresses Issue #44 - So long a the user specifies unchanging pidfiles in the config file for each process, they'll be able to add processes as needed without worry about pidfile values changing. I'll be creating a new pull request in a bit that allows users to specify a config file per process.

metavida avatar Jan 26 '16 22:01 metavida