Closed mpestritto closed 11 years ago
That sounds like a good idea. Do you have time to knock up a patch at all?
A temporary workaround that you could use is Ruby's timeout
require 'timeout'
Timeout.timeout(5) do
sleep 10
puts "I'm awake"
end
This will timeout raising the exception Timeout::Error: execution expired.
This has been merged to master and will be part of a new gem soon.
With the bitly snafu today, is there anyway to put in short timeout ( 2-3 seconds max ) or make it configurable for this library?
Some of my pages do on-the-fly Bitly link conversions for creating tweets and Bitly was taking over 30 seconds to return a timeout error which tied up processes on heroku. To a user, it seemed as the app was down because all processes were tied up.