0.2.0 • Published 8 years ago

simple-pouch v0.2.0

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

simple-pouch

version download

js-standard-style

A simple, lightweight queue using Redis rpush and lrange, ltrim.

Usage

var pouch = require('../lib/pouch').create({
  host: '127.0.0.1',
  port: 6379,
  name: 'test',
  size: 50
})

// put items
pouch.put(['1', '2', '3', '4', '5'])
pouch.put(function (err, len) {
  console.log(len)
}, ['6', '7', '8', '9', '10'])

pouch.count(function (err, count) {
  console.log('count: ' + count)
})

setTimeout(function () {
  pouch.list(function (err, items) {
    console.log('list', items)
  }, 0, 100)

  pouch.pick(function (err, items) {
    console.log(items)

    pouch.count(function (err, count) {
      console.log('count: ' + count)
    })
  }, 8)
}, 500)

Release History

See the changelog

LICENSE

simple-pouch is licensed under the MIT license.