I have several tasks that are set using the after_create hook object. During my tests, I saved the object, so one job works after about 5 minutes, and one job after 10 minutes (using two model attributes, which are dates). The problem is that both seem immediately executed. If I create an object that sets two date values within 24 hours in the future, it seems to be waiting. Therefore, I am wondering, is not it, as the worker thinks, different from what a server is. Is there a way to make sure that the delayed_job worker is in sync?
Here is the code for the job queues:
Delayed::Job.enqueue(CharityProductCreateJob.new(self.id, shop.id), 0, self.start_date) Delayed::Job.enqueue(CharityProductCreateJob.new(self.id, shop.id), 0, self.end_date)
source share