Class: Newsly::NewsletterSender
- Inherits:
-
Object
- Object
- Newsly::NewsletterSender
- Defined in:
- app/workers/newsly/newsletter_sender.rb
Class Method Summary collapse
Class Method Details
.perform(newsletter_id, recipient_groups) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'app/workers/newsly/newsletter_sender.rb', line 4 def self.perform(, recipient_groups) for group in recipient_groups Newsly.(group.to_sym).call().find_each(:batch_size => 1000) do |resource| Newsly::Mailer.async_deliver.(, resource.send(Newsly.resource_email_column), resource.to_liquid) end end end |