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

Error when scheduling a delayed job with a difference of less than 1 second

Open mdemblani opened this issue 6 years ago • 1 comments

The issue is a part of #284 which appears when we try to enqueue jobs with a difference of less than 1 second at a very high-rate. The exact issue happens since the enqueue methods convert the millisecond timestamp into seconds, thereby rounding off a large portion of the timestamp, which then means that conflicts appear if a similar job is scheduled before the first one is picked up by a worker.

mdemblani avatar Jun 18 '19 10:06 mdemblani

https://github.com/taskrabbit/node-resque/issues/284 is marked as will not fix

I thought we could use this issue to suggest alternative resque patterns.

Perhaps a single job at each per-second timestamp could be enqueued to then process a bach of jobs it enqueues at that moment?

evantahler avatar Jun 19 '19 06:06 evantahler