resque-scheduler icon indicating copy to clipboard operation
resque-scheduler copied to clipboard

enqueue_at sometimes needs a time duration added to the date to enqueue correctly

Open Freatnor opened this issue 5 years ago • 0 comments

Right now we're using a TimeWithZone date saved on an object for the enqueue_at time. In some cases it won't properly enqueue unless I add a duration, for instance: enqueue_at(object.time_with_zone, HandlerClass, object.id) vs. enqueue_at(object.time_with_zone + 1.seconds, HandlerClass, object.id) In both cases the time passed to enqueue_at() is a TimeWithZone.

The interesting thing is I can see the second job appear in the delayed queue but not the first. However if I use remove_delayed() it will remove both jobs making me think it might be something to do with the timestamp.

Freatnor avatar Apr 12 '19 18:04 Freatnor