The Ruby on Rails and ClojureScript experts

Sep 5, 2012

The link below explains how to make a Ruby instance method backgroundable in Torquebox. Tobey Crawley told me via the mailing list how to make class methods backgroundable by including the Backgroundable Module into the class’ singleton class:

class Thing

  class « self

    include TorqueBox::Messaging::Backgroundable

    def foo

      # do something


    always_background :foo


end # will always be backgrounded.

Note: make sure to call always_background after the method is defined. There is a ticket to fix this limitation:

If you want to use the background proxy method instead of always backgrounding foo (i.e. you can just leave out the always_background call altogether.

Link: Chapter 8. TorqueBox Messaging via