Sha256: b5d2b24ff5ffb42bc9afe789fcc27e5f690ea80281d81dd1856343474973158b

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

module MultiWorker
  module Adapters
    class SuckerPunch
      def self.configure(base, opts={})
        base.class_eval do
          @queue = opts[:queue]

          include ::SuckerPunch::Job

          def self.perform(*args)
            self.new.perform(*args)
          end

          def self.perform_async(*args)
            self.new.async.perform(*args)
          end

          def perform_async(*args)
            async.perform(*args)
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
multi_worker-0.2.0 lib/multi_worker/adapters/sucker_punch.rb
multi_worker-0.1.0 lib/multi_worker/adapters/sucker_punch.rb