Created
January 30, 2012 07:45
-
-
Save parolkar/1703097 to your computer and use it in GitHub Desktop.
Handy script to help analyse heroku dyno behaviour [CEDAR STACK]
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
available_signals = Signal.list | |
f = STDERR | |
f.puts "Arguments to the process \n #{ARGV.inspect} \n\n" | |
f.puts "Environment of the process \n #{ENV.inspect} \n\n" | |
f.puts "Available Signals: #{available_signals.keys.inspect}" | |
f.flush | |
available_signals.keys.each do |signal| | |
eval(" | |
trap :#{signal} do | |
f.puts \"SIG#{signal} trapped at #{Time.now}\" | |
f.flush | |
end | |
"); | |
end | |
loop do | |
#something | |
end | |
#run lambda { |env| [200, {'Content-Type'=>'text/plain'}, StringIO.new("Analysis App\n")] } |
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
web: ruby dyno_process_analyse.rb -p $PORT | |
worker: ruby dyno_process_analyse.rb -p $PORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment