Class: MailRoom::Delivery::Sidekiq
- Inherits:
-
Object
- Object
- MailRoom::Delivery::Sidekiq
- Defined in:
- lib/mail_room/delivery/sidekiq.rb
Overview
Postback 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
25 26 27 |
# File 'lib/mail_room/delivery/sidekiq.rb', line 25 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
21 22 23 |
# File 'lib/mail_room/delivery/sidekiq.rb', line 21 def @options end |
Instance Method Details
#deliver(message) ⇒ Object
deliver the message by pushing it onto the configured Sidekiq queue
31 32 33 34 35 36 37 |
# File 'lib/mail_room/delivery/sidekiq.rb', line 31 def deliver() item = item_for() client.lpush("queue:#{.queue}", JSON.generate(item)) true end |