drupalprojects/resque — pull request #1 by zackurben (2014-08-10 03:00:30+00:00)
Title: Adding LockPlugin

This adds support for a queue item to use a unique key. Before invoking the Resque Job perform function, the job will attempt to acquire the unique key, by means of the 'beforePerform' event. If the key is currently being used then the job will be re-queued, otherwise this job will take the key and begin its perform function. After the perform is complete the lock will release itself.

The 'beforePerform', 'onFailure', and 'afterPerform' events should have Resque listeners to ensure the LockPlugin works as intended.