Sha256: 3d2408ef21386a4b699d05e44ebf2605c9a0ac1ac043052dd6878a6f5c47bffd

Contents?: true

Size: 442 Bytes

Versions: 3

Compression:

Stored size: 442 Bytes

Contents

class ExampleQueuePoller < Pheme::QueuePoller
  def initialize(queue_url: 'http://mock_url.test', **)
    super
  end

  def handle(message, metadata, message_attributes)
    case message.status
    when 'complete', 'rejected'
      ExampleMessageHandler.new(message: message, metadata: metadata, message_attributes: message_attributes).handle
    else
      raise ArgumentError, "Unknown message status: #{message.status}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pheme-6.0.0 spec/support/example_queue_poller.rb
pheme-5.3.4 spec/support/example_queue_poller.rb
pheme-5.3.3 spec/support/example_queue_poller.rb