Rails 4 ActionMailer deliver_later method not working if given extended wait period
|Added at||2016-12-02 01:12|
I have a Rails application that is hosted on Heroku that has a feature to send delayed emails.
So the deliver_later! method for ActionMailer is able to send emails asynchronously at a scheduled time.
Basically I have a mailer called NotificationMailer, and when I do
I am able to receive the email 5 minutes from the time it was sent, and 30 minutes from the time it was sent, however when I get more ambitious and do
Which means I am supposed to receive the next day at noon, but I am unable to receive that email. I looked a lot into this, and I read that Heroku's dynos sleep whenever there's an extended period of inactivity, and then all ActiveJobs in the queue also sleeps. I thought this might be a cause for the problem. I'm not sure how exactly to fix this and would appreciate any suggestions!