redis-plan
Message queue based on redis for NodeJS and Mangrove internal usage.
Installation
$ npm install redis-plan
Usage
initialization
var plan = port host option;
for queueing
;
worker just like this simplely
;
In the end, remeber that calling plan.end()
to close the connection to redis.
Parallel Worker
var plan = ;plan;;
Parallel Queueing
var plan = ;// just a simple for loopfor var i=0; i<10; i++ ;
Async Feedback
;
NB: success
, close
and error
is especial keys, which you could use to report
data to redis and local event success
and error
, and in redis you are able
to access these reports at plan:success
, plan:close
and plan:error
.
Gracefully Quit
process;
License
MIT