Reputation: 179
I'm using the "resque" gem along with "resque-scheduler". I have to send out 10,000+ emails a week (about 1,500 a day). My email table has a boolean called "sent" (true/false).
Would it be best if I use the "enqueue_at" method & just have a bunch of queued emails (not sure if they literally get queued in resque.. maybe someone can clarify this) Or would it be better if I do a cron type task and just run down all the emails where the "sent" boolean is "false" & update it to "true" after the emails are sent?
Which would be the best solution & why?
Thanks in advance
Upvotes: 1
Views: 675
Reputation: 17631
Using a cron
Using enqueue_at
Resque.enqueue_at(5.days.from_now, SomeJob)
)I would do a cron task using resque-scheduler and select only unsent emails in my worker to process them and finally mark them as sent.
Upvotes: 2