I'm trying to contact a REST API using ActiveResource on Rails 2.3.2.

I'm attempting to use the timeout functionality so that if the resource
I'm contacting is down I can fail quickly - I'm doing this with the
following:

class WorkspaceResource < ActiveResource::Base
  self.timeout = 5
  self.site = "http://mysite.com/restAPI";
end

However, when I try to contact the service when I know it isn't
available, the class only times out after the default 60 seconds. I can
see from the error stack that the timeout error does indeed come from an
ActiveResource class in my gem folder that has the proper functions to
allow timeout settings, but my set timeout never seems to work.

Any thoughts?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to