Alois

Joined

3,510 Experience
35 Lessons Completed
0 Questions Solved

Activity

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 https://stevechanin.blogspot.com/2017/05/deliverlater-not-working-in-rake-tasks.html 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.