lib/pwwka/transmitter.rb in pwwka-0.9.0 vs lib/pwwka/transmitter.rb in pwwka-0.10.0.RC

- old
+ new

@@ -73,10 +73,11 @@ end # Use Resque to enqueue the message. # - :delay_by_ms:: Integer milliseconds to delay the message. Default is 0. def self.send_message_async(payload, routing_key, delay_by_ms: 0) - Resque.enqueue_in(delay_by_ms/1000, SendMessageAsyncJob, payload, routing_key) + job = Pwwka.configuration.async_job_klass + Resque.enqueue_in(delay_by_ms/1000, job, payload, routing_key) end # Send a less important message that doesn't have to go through. This eats # any `StandardError` and logs it, returning false rather than blowing up. #