Efficiently reschedule ActiveJob (resque/sidekiq)

老子叫甜甜 提交于 2019-12-03 19:33:04

There is none, jobs are not meant to be rescheduled. You have answered your own question:

In this case every job could check if it should be delivered or not thus invalid jobs would be ignored and only the last one would be executed.

The alternative is to re-architect how you send campaigns: store the delivery date in the database and have cron check every minute for campaigns which need delivery now and create the Sidekiq job right then.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!