Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ping_command is not worked. #14

Open
zw963 opened this issue Sep 20, 2016 · 1 comment
Open

ping_command is not worked. #14

zw963 opened this issue Sep 20, 2016 · 1 comment

Comments

@zw963
Copy link

zw963 commented Sep 20, 2016

Following code, I want to make sidekiq restart when I start rails.

log_file=Rails.root.join('log/sidekiq.log')
pid_file=Rails.root.join('tmp/pids/sidekiq.pid')

controller = DaemonController.new(
  :identifier => 'Sidekiq daemon',
  :start_command => "sidekiq -e #{Rails.env} -q default -L #{log_file} -d -P #{pid_file}",
  :ping_command => "kill -0 `cat #{pid_file}`",
  :pid_file => "#{pid_file}",
  :log_file => "#{log_file}",
  :start_timeout => 25)

begin
  controller.restart
rescue DaemonController::AlreadyStarted
end

But, ping_command seem like not worked, because controller.restart
is invalid for me. it never start sidekiq.

But, if change to controller.start, it worked.

@zw963
Copy link
Author

zw963 commented Apr 12, 2017

This project is dead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant