Skip to content

Commit

Permalink
indexing job data
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jul 28, 2011
1 parent 7b39bdf commit 0efb444
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/queue/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var EventEmitter = require('events').EventEmitter
, events = require('./events')
, pool = require('./pool')
, reds = require('reds')
, noop = function(){};

/**
Expand All @@ -20,6 +21,12 @@ var EventEmitter = require('events').EventEmitter

exports = module.exports = Job;

/**
* Search instance.
*/

var search = reds.createSearch('q:search');

/**
* Default job priority map.
*/
Expand Down Expand Up @@ -542,4 +549,7 @@ Job.prototype.update = function(fn){

// data
this.set('data', json, fn);

// search data
search.index(json, this.id);
};

0 comments on commit 0efb444

Please sign in to comment.