Sha256: d5ffbc705051b606fba65d4d97add31696340e55b1ce64a990f6df1fc25ff59c

Contents?: true

Size: 406 Bytes

Versions: 6

Compression:

Stored size: 406 Bytes

Contents

module SneakersPacker
  module CommonWorker
    def self.included(klass)
      klass.class_eval do
        include ::Sneakers::Worker
      end
    end

    def packer
      SneakersPacker.message_packer
    end

    def work(message)
      #puts "get #{message}"
      request_data, from = packer.unpack_request message
      #puts "call from #{from}"
      call request_data
      ack!
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sneakers_packer-0.2.0 lib/sneakers_packer/common_worker.rb
sneakers_packer-0.1.5 lib/sneakers_packer/common_worker.rb
sneakers_packer-0.1.4 lib/sneakers_packer/common_worker.rb
sneakers_packer-0.1.3 lib/sneakers_packer/common_worker.rb
sneakers_packer-0.1.2 lib/sneakers_packer/common_worker.rb
sneakers_packer-0.1.1 lib/sneakers_packer/common_worker.rb