lib/backgrounded/handler/workling_handler.rb in backgrounded-0.6.0 vs lib/backgrounded/handler/workling_handler.rb in backgrounded-0.6.1

- old
+ new

@@ -1,14 +1,17 @@ -class Backgrounded::Handler::WorklingHandler < Workling::Base +class Backgrounded::Handler::WorklingHandler def request(object, method, *args) options = { :class => object.class.name, :id => object.id, :method => method, :params => args } - Backgrounded::Handler::WorklingHandler.async_perform options + BackgroundedWorker.async_perform options end - def perform(options = {}) - options[:class].constantize.find(options[:id]).send(options[:method], *options[:params]) + + class BackgroundedWorker < Workling::Base + def perform(options = {}) + options[:class].constantize.find(options[:id]).send(options[:method], *options[:params]) + end end end