1.0.0 • Published 5 years ago

random-access-memory-store v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

Random Access Memory Store

Ephemeral store with random access for better-queue.

The implementation is based on Memory Store which is the default store used in the better-queue package. The difference is that the queued items will be processed in random order.

First in, last out...

Note that setting the filo flag on the queue has no effect when using this store.

Getting started

var Queue = require('better-queue');
var RandomAccessMemoryStore = require('random-access-memory-store');
 
var q = new Queue(function (input, cb) {
  
  // Some processing here ...
 
  cb(null, result);
}, {
  store: new RandomAccessMemoryStore()
});