You can clone this project from the 7.x-1.x branch if you want my semi-stable release or the master branch if you want my latest changes.
This module provides an extended API for creating and managing queues. It is
designed to be used as an API for other modules and has no user-facing
components at this time.
Additional queue features currently provided include:
- Uniqueness constraint on items being added to the queue
- Priority ordering for items being popped out of the queue
Why not extend DrupalQueueInterface?
In all places, we've attempted to emulate the core Queue implementation as
closely as possible, to minimize the amount of developer wtf.
However, we felt that rather than trying to layer something on top of something not designed for unique and prioritized queue items, it would be more sensible to build a proper solution from the ground up as the default - it will be faster and cleaner as a default.
It would be very possible to build a wrapper around DQI that leverages another table for priority and uniqueness information if integration with DQI is required.
Getting a queue object
To use our queue module, first you will need to get an instance of a queue
object. This is as simple as calling:
$queue = UniqueQueue::get($queue_name);