LearnBoost/kue — pull request #307 by jtblin (2014-03-25 21:35:33+00:00)
Title: Handle errors emitted by redis by listening on error event to avoid process to exit

See http://nodejs.org/api/events.html#events_class_events_eventemitter
> When an EventEmitter instance experiences an error, the typical action is to emit an 'error' event. Error events are treated as a special case in node. If there is no listener for it, then the default action is to print a stack trace and exit the program.

Redis emits errors in several places e.g. https://github.com/mranney/node_redis/blob/master/index.js#L185. As they are not listened to currently, the process crashes. With this change, errors are listened on the redis client and emitted back to the queue.