resque/resque-scheduler

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

Freatnor opened this issue · 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.