Last active
August 29, 2015 13:55
-
-
Save jlstr/8777950 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "starts sidekiq" | |
task :start_sidekiq do | |
run "cd /home/deploy/work/tiptotem/current/ && bundle exec sidekiq -d -L /home/deploy/work/tiptotem/current/tmp/sidekiq.log -e production" | |
end | |
after 'deploy', 'servers:start_sidekiq' | |
desc "stops sidekiq" | |
task :stop_sidekiq do | |
message = "Sidekiq not working" | |
run "if [ -z $(ps -ef | awk '/sidekiq/{print $2}') ]; then echo #{message}; else kill -9 $(ps -ef | awk '/sidekiq/{print $2}'); fi" | |
end | |
before 'deploy', 'servers:stop_sidekiq' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment