postorder

0.0.8 • Public • Published

Postorder

Minimal work queue in postgres.

Installation

npm install postorder

Producer usage

var client = require('postorder').create('pg://localhost/db');
client.send({ my: 'word' });

Consumer usage

var client = require('postorder').create('pg://localhost/db');
client.listen(function (err, msg) {
  if(err) throw err;
  console.log(msg.my); //> 'word'
});

// you can also use shift to only take a single work item.
client.shift(function (err, msg) { });

Readme

Keywords

none

Package Sidebar

Install

npm i postorder

Weekly Downloads

1

Version

0.0.8

License

BSD

Unpacked Size

4.07 kB

Total Files

5

Last publish

Collaborators

  • sciolist