Skip to content

Commit

Permalink
detach route before attach; sleep before reading logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Zoschke committed Oct 4, 2011
1 parent 3c86f86 commit dfa1a5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ run lambda { |env|
end

# attach route
@heroku.route_detach(@app, @r["url"], @r["ps"])
@heroku.route_attach(@app, @r["url"], @p["process"])
puts "info: attached route #{@r.inspect} to #{@p["process"]}"

# introspect sshd ps
sleep 1
logs = ""
@heroku.read_logs(@app) { |chk| logs << chk }
puts logs

user = logs.scan(/user=(.*)/).last[0]
uri = URI.parse(@r["url"])
Expand Down

0 comments on commit dfa1a5a

Please sign in to comment.