LIFO
Last-in, First Out
In some cases, it is useful to process jobs in a LIFO (Last-in, First-Out) fashion. This means that the newest jobs added to the queue will be processedbefore the older ones.
import { Queue }from'bullmq';constmyQueue=newQueue('Paint');// Add a job that will be processed before all othersawaitmyQueue.add('wall', { color:'pink' }, { lifo:true });
Last updated
Was this helpful?