Created
July 12, 2013 07:52
-
-
Save Olefine/5982649 to your computer and use it in GitHub Desktop.
tasks for faye server with thin
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
| namespace :faye_server do | |
| desc "Start faye server" | |
| task :start do | |
| run "cd #{current_path};RAILS_ENV=production bundle exec rackup faye.ru -s thin -E production -D -P tmp/pids/faye.pid" | |
| end | |
| desc "Stop faye server" | |
| task :stop do | |
| run "cd #{current_path};if [ -f tmp/pids/faye.pid ] && [ -e /proc/$(cat tmp/pids/faye.pid) ]; then kill -9 `cat tmp/pids/faye.pid`; fi" | |
| end | |
| desc "Restart faye server" | |
| task :restart do | |
| stop | |
| start | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment