Any job created with the .delayUntil option would always be selected by the driver, then be refused by Queues, and selected over and over again until it was time to run it.
This would block the queue.
This was due to not tracking when the delayed job was actually supposed to run at all.
With this PR, delayed jobs will be ignored until it's actually time to run them.
To avoid any schema change, the created_at DB field is (ab)used to store the delayUntil date, if present.
Fixes https://github.com/m-barthelemy/vapor-queues-fluent-driver/issues/15
Any job created with the
.delayUntil
option would always be selected by the driver, then be refused byQueues
, and selected over and over again until it was time to run it. This would block the queue.This was due to not tracking when the delayed job was actually supposed to run at all.
With this PR, delayed jobs will be ignored until it's actually time to run them. To avoid any schema change, the
created_at
DB field is (ab)used to store thedelayUntil
date, if present.