Skip to content

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

License

Notifications You must be signed in to change notification settings

madsquare/simple-pouch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.pick(function (err, items) {
    console.log(items)

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

LICENSE

simple-pouch is licensed under the MIT license.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%