Class: Newsly::NewsletterBatchSender
- Inherits:
-
Object
- Object
- Newsly::NewsletterBatchSender
- Defined in:
- app/workers/newsly/newsletter_batch_sender.rb
Class Method Summary collapse
Class Method Details
.perform(newsletter_id, recipient_group, batch_size) ⇒ Object
4 5 6 7 8 |
# File 'app/workers/newsly/newsletter_batch_sender.rb', line 4 def self.perform(, recipient_group, batch_size) Newsly.(recipient_group.to_sym).call().limit(batch_size).each do |resource| Newsly::Mailer.async_deliver.(, resource.send(Newsly.resource_email_column), resource.to_liquid) end end |