Class: MailRoom::Delivery::Sidekiq
- Inherits:
-
Object
- Object
- MailRoom::Delivery::Sidekiq
- Defined in:
- lib/mail_room/delivery/sidekiq.rb
Overview
Sidekiq Delivery method
Defined Under Namespace
Classes: Options
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#deliver(message) ⇒ Object
deliver the message by pushing it onto the configured Sidekiq queue.
-
#initialize(options) ⇒ Sidekiq
constructor
Build a new delivery, hold the mailbox configuration.
Constructor Details
#initialize(options) ⇒ Sidekiq
Build a new delivery, hold the mailbox configuration
26 27 28 |
# File 'lib/mail_room/delivery/sidekiq.rb', line 26 def initialize() = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
22 23 24 |
# File 'lib/mail_room/delivery/sidekiq.rb', line 22 def end |
Instance Method Details
#deliver(message) ⇒ Object
deliver the message by pushing it onto the configured Sidekiq queue
32 33 34 35 36 37 38 |
# File 'lib/mail_room/delivery/sidekiq.rb', line 32 def deliver() item = item_for() client.lpush("queue:#{options.queue}", JSON.generate(item)) true end |