Created
July 2, 2010 05:38
-
-
Save clayton/460977 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 "Show ps" | |
task :ps do | |
run 'ps ax' do | channel, stream, data | | |
puts data if stream == :out | |
if stream == :err | |
puts "[err: #{channel[:host]}] #{data}" | |
break | |
end | |
end | |
end | |
desc "Stream log from rails" | |
task :log, :roles => :app do | |
stream "tail -f #{current_path}/log/#{rails_env}.log" | |
end | |
desc "Get uptime from server" | |
task :uptime, :roles => :app do | |
run 'uptime' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment