Skip to content

Instantly share code, notes, and snippets.

@kylesuss
Last active December 27, 2015 04:58
Show Gist options
  • Select an option

  • Save kylesuss/7270141 to your computer and use it in GitHub Desktop.

Select an option

Save kylesuss/7270141 to your computer and use it in GitHub Desktop.
Using Sidekiq on EngineYard w/out Chef
# 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