BullMQ
Search…
LIFO
Last-in, First Out
In some cases, it is useful to process the jobs in a LIFO (Last-in, First-Out) fashion. This means that the newest jobs added to the queue will be processed before the older ones.
1
import { Queue } from 'bullmq';
2
3
const myQueue = new Queue('Paint');
4
5
// Add a job that will be processed before all others
6
await myQueue.add('wall', { color: 'pink' }, { lifo: true });
Copied!
Last modified 3mo ago
Copy link