Skip to content

Instantly share code, notes, and snippets.

View lchenay's full-sized avatar

Laurent lchenay

View GitHub Profile
var worker = require('kue/lib/queue/worker');
var oldFn = worker.prototype.process;
worker.prototype.process = function(job, fn) {
var self = this;
var args = arguments;
var domain = require('domain').create();
domain.on('error', function(err){
self.failed(job, err, fn);