lib/cfoundry/v2/app.rb in cfoundry-0.6.1.rc3 vs lib/cfoundry/v2/app.rb in cfoundry-0.6.1.rc4
- old
+ new
@@ -173,9 +173,24 @@
@diff.clear
true
end
+ def stream_update_log(log_url)
+ offset = 0
+
+ while true
+ begin
+ @client.stream_url(log_url + "&tail&tail_offset=#{offset}") do |out|
+ offset += out.size
+ yield out
+ end
+ rescue Timeout::Error
+ end
+ end
+ rescue CFoundry::APIError
+ end
+
# Determine application health.
#
# If all instances are running, returns "RUNNING". If only some are
# started, returns the precentage of them that are healthy.
#