LearnBoost/kue — pull request #218 by brandoncarl (2013-07-12 04:43:28+00:00)
Title: Solving race conditions for search terms and adds "indexing" with search

Two proposed fixes in this pull request:

1. Solves race conditions inherent in indexing. As discussed in LearnBoost/kue#94 and LearnBoost/kue#98, jobs may incorrectly be removed before search indexes have completed. I add an "is_indexed" parameter and force that to be true for removal. If it is not true, the remove function listens for the event via pubsub and processes once is_indexed has been called.

2. Adds "indexing" capabilities as discussed in LearnBoost/kue#217. Namely, auto-indexing all fields does not make sense for a job queue. Job constructor now includes third parameter `indexes`. When undefined, operates traditionally (for backwards-compatibility), a blank string indexes only the job type, otherwise, indexes only specified keys. Keys are separated by spaces. For example 'key3 key21 key33'.

Finally, I don't have access to the testing suite, but tried to run it through a number of scenarios ahead of submitting the pull request.

Brandon