Why
When jobs are scheduled to run at the same time, the current take() operation on drivers does not sort for higher priority jobs.
Solution
- Add an additional optional "priority" field to the document
- Add necessary indexes to allow drivers to take by
visible < now, ordered by priority DESC then visible DESC
- Loki driver change
- Mongo driver change
- Postgres driver change
Why
When jobs are scheduled to run at the same time, the current
take()operation on drivers does not sort for higher priority jobs.Solution
visible < now, ordered bypriority DESCthenvisible DESC