Last active
December 27, 2015 04:58
-
-
Save kylesuss/7270141 to your computer and use it in GitHub Desktop.
Using Sidekiq on EngineYard w/out Chef
This file contains hidden or 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
| # rails_root/deploy/before_restart.rb | |
| # kill sidekiq processes | |
| run "pkill [s]idekiq" | |
| # rails_root/deploy/after_restart.rb | |
| # restart sidekiq | |
| # The & at the end tells Sidekiq to run in the background. It was necessary. | |
| run "cd /data/APPNAME/current && sudo -u deploy RAILS_ENV=production /usr/local/bin/bundle exec sidekiq -e production -c 5 &" | |
| # Run this in the EY terminal to kill all currently running Sidekiq processes: | |
| kill -TERM `ps aux | grep -i [s]idekiq | grep -v grep | awk '{print $2}'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment