Rails + Devise + delayed_job?

后端 未结 9 2062
长情又很酷
长情又很酷 2020-12-24 07:38

I have a Rails 3 App using Devise on Heroku. Problem is I\'m sending emails with Sendgrid and email delivery is slow, it makes the app hang. So I\'m interested in using dela

9条回答
  •  暖寄归人
    2020-12-24 08:25

    I have generally found it best to avoid any and all background-job task managers available for Ruby and Rails, period. They suck.

    Instead, I use crontab which is an ancient program and very good at its job. Just make a script to do your dirty work every so often and tell crontab to run it at the right times using rails runner. This keeps those pesky long-running tasks outside the run-time of the rest of your Rails application, but you still have access to the database and the whole Rails stack if you want/need it.

提交回复
热议问题