Rails 3/delayed_job - Wanted: Basic example of delayed mail

前端 未结 3 2113
谎友^
谎友^ 2020-12-30 16:08

I\'ve been trying to figure out how to send delayed mail using delayed_job with rails 3. I\'ve tried pretty much every combination of feasible possibilities I can think of -

3条回答
  •  轮回少年
    2020-12-30 16:51

    Both using the .delay method and setting handle_asynchronously :test_mail is redundant. Try removing the .delay method from your code. use simply

    Testmailer.test_mail   # without .deliver due to a delayed_job issue
    

    However, I ran some test on your configuration and when using sqlite, run_at is simply ignored (do not know why), but when using mysql2 everything works fine.

提交回复
热议问题