LearnBoost/kue — pull request #125 by tomerd (2012-08-16 07:13:56+00:00)
Title: wildcard job name processing

this commit adds support for wildcard job name processing. for example:

say you have created several jobs with similar name, using some internal naming convention:

jobs.create('xx:1:yy', {}).save();
jobs.create('xx:2:yy', {}).save();
jobs.create('xx:3:yy', {}).save();

and you would like to process them using a single handler:

jobs.process('xx:*:yy', function(job, done)
{
do_work(...);
});

to implement this i have changed worker's getJob code to first look up all the relevant job keys and then iterate over them to find the first matching job. see attached patch.