Sha256: d0683e615020aeabb03b3c62732e363cfdc84e947bb224d97543275427700264

Contents?: true

Size: 456 Bytes

Versions: 1

Compression:

Stored size: 456 Bytes

Contents

require 'resque'

# handler that acts like the in process handler but marshalls the arguments
# this simulates how resque encodes/decodes values to/from redis
# useful when passing symbols to arguments and they end up being processed as strings
module Backgrounded
  module Handler
    class PseudoResqueHandler
      def request(object, method, args, options={})
        object.send method, *Resque.decode(Resque.encode(args))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backgrounded-resque-2.0.0.pre1 lib/backgrounded/handler/pseudo_resque_handler.rb