Sha256: 25e844bf43ed90afe49d62da70ecef853a7a9f6c1afc4ae50ce950fa3a0cbef5

Contents?: true

Size: 464 Bytes

Versions: 12

Compression:

Stored size: 464 Bytes

Contents

module Pwwka
  class SendMessageAsyncJob

    extend Pwwka::Logging

    @queue = 'pwwka_send_message_async'

    extend Resque::Plugins::ExponentialBackoff rescue nil # Optional
    @backoff_strategy = Pwwka.configuration.send_message_resque_backoff_strategy

    def self.perform(payload, routing_key)
      info("Sending message async #{routing_key}, #{payload}")
      Pwwka::Transmitter.send_message!(payload, routing_key, on_error: :raise)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pwwka-0.10.0 lib/pwwka/send_message_async_job.rb
pwwka-0.10.0.RC lib/pwwka/send_message_async_job.rb
pwwka-0.9.0 lib/pwwka/send_message_async_job.rb
pwwka-0.9.0.RC1 lib/pwwka/send_message_async_job.rb
pwwka-0.8.0 lib/pwwka/send_message_async_job.rb
pwwka-0.8.0.RC1 lib/pwwka/send_message_async_job.rb
pwwka-0.7.0.RC1 lib/pwwka/send_message_async_job.rb
pwwka-0.7.0 lib/pwwka/send_message_async_job.rb
pwwka-0.6.0 lib/pwwka/send_message_async_job.rb
pwwka-0.5.2 lib/pwwka/send_message_async_job.rb
pwwka-0.5.1 lib/pwwka/send_message_async_job.rb
pwwka-0.5.0 lib/pwwka/send_message_async_job.rb