queue is ignoring priority if job has delay option too.
Created by: assafdd
Description
Priority queues are working great. But if I add delay option to job, priority value seems to get ignored.
Test code to reproduce
const Queue = require('bull');
var priorityQueue = new Queue('priorityQueue', 'redis://127.0.0.1:6379');
priorityQueue.process(function(job){
console.log(`processing job ${job.id} priority: ${job.data.p}`);
return Promise.resolve();
});
priorityQueue.add({p: 2}, {priority:2 ,delay:10});
priorityQueue.add({p: 1}, {priority:1 ,delay:10});
Bull version
3.3.9