Error delivery is synchronous

wizards's Avatar

wizards

20 Feb, 2009 03:42 PM via web

As far as I can tell error reporting is synchronous: if one of my mongrels throws an exception and if for some reason hoptoad is slow to respond (whether it's a hoptoad app problem, or a networking problem somewhere etc.) then my app will block until the notification has been delivered. Is this accurate ? It seems to me like it wouldn't be massively difficult for the notifier to spin up a thread that did the job of sending error reports or is there some subtlety I've missed ?

  1. 2 Posted by tammersaleh on 20 Feb, 2009 04:58 PM

    tammersaleh's Avatar

    Hi Wizards,

    Yes, error delivery is synchronous. We purposefully avoided any forking or threading so as to keep the official plugin as simple as possible. We don't want to introduce complication that could go haywire and affect the client application.

    That being said, the plugin is on github, and we encourage developers to fork it or write entirely new implementations. This has been done to support other languages, and could be done to add threading or file-based-queueing model.

    Cheers, Tammer

  2. Support Staff 3 Posted by Joe Ferris on 19 May, 2009 09:53 PM

    Joe Ferris's Avatar

    Hey,

    Just wanted to note that you can configure the timeouts used when contacting Hoptoad:

    # config/initializers/hoptoad.rb
    HoptoadNotifier.configure do |config|
      config.http_open_timeout = 1
      config.http_read_timeout = 1
    end
    

    -Joe

  3. Joe Ferris resolved this discussion on 19 May, 2009 09:53 PM.

Comments are currently closed for this discussion. You can start a new one.