README
poppin
A redis based queue for async background jobs. Queue/unqueue jobs onto
the queue and it will emit command
that you can then take care of. A
command is basically an array with [COMMAND_NAME, [, JSON]]
. You can
spawn multiple poppers
to process jobs.
Getting Started
There are two important parts of poppin. The Pusher and the Popper.
The Pusher
var Poppin = require('poppin');
var pusher = new Poppin.Pusher();
pusher.createCommand('createStory', { name: 'Jack and Jill' });
The Popper
And if you are running the Popper. They will be sent a command and you have to take care of it by doing:
var Poppin = require('poppin');
var popper = new Poppin.Popper();
popper.on('command', function(command) {
console.log(command.name);
});
popper.run();