kusor/node-workflow-redis-backend — pull request #6 by greuze (2014-01-29 15:27:19+00:00)
Title: Removed 'multi', fixed some bugs and error handling

Fixed stuff:
- Current 'getJobs' code hangs when there is no job in redis (res.forEach has 0 iterations and callback is never called).
- There are some missing error handling (the 'err' parameter is not always checked before assuming that the request was ok).
- The use of 'multi' cause the code to be very slow with medium load (1000~2000 jobs), as it is always executed in one single transaction. Doing many individual request will cause that redis automatically pipeline them (and process in parallel).
- A common function 'processJobList' has been created, to reuse code and simplify both execution blocks (execution === 'undefined' and the opposite).