beforeEach(function (done) { Queue = kue.createQueue(); Queue.clear(done); });
constructor () { this.priority = { HIGH: 'high', NORMAL: 'normal', LOW: 'low' } this.queue = kue.createQueue({ redis: { createClientFactory: function () { return redis.createClient() } } }) }
var Queue = function(broker, options) { options = options || {} var that = this this.broker = broker this.job_names = [] this.queues = {} this.redis_config = {} this.ttl_buffer = 1000 this.q = Kue.createQueue({ prefix: 'q', redis: options.redis }) this.q.client.once('connect', function(){ debug('Queue ready! ... connected with redis') }) _Kues.push(this.q) // Kue.app.listen(3000) }