Class: RenoteDac::ServiceQueueWorker
- Inherits:
-
Object
- Object
- RenoteDac::ServiceQueueWorker
- Includes:
- Sneakers::Worker
- Defined in:
- app/workers/renote_dac/service_queue_worker.rb
Instance Method Summary collapse
-
#work(message) ⇒ Object
work method receives message payload in raw format in our case it is JSON encoded string which we can pass to RecentPosts service without changes.
Instance Method Details
#work(message) ⇒ Object
work method receives message payload in raw format in our case it is JSON encoded string which we can pass to RecentPosts service without changes
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/workers/renote_dac/service_queue_worker.rb', line 16 def work() # invoke service object to save message to database = JSON.parse() RenoteDac::Mailer.enqueue( ['postmark_data']['template'], ['postmark_data']['address'], ['postmark_data']['params'], ['postmark_data']['attachments'] ) # let queue know message was received ack! end |