3,510 Experience
35 Lessons Completed
0 Questions Solved


It took me some time to understand why my ActionMailer::MailDeliveryJob were getting enqueued but not performed when running the rake task. Reading this article it seems that using UserMailer#deliver_later puts the job in a memory queue that dies when the rake task ends.
Using UserMailer#deliver_now or putting the rake task to sleep with a sleep(5) at the end of it does help for now.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.