Skip to content

wdalmut/queue-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Queue

Build Status

Just a simple queue based on files

$ npm install queue-file --save
require('queue-file')("/tmp/queue", (err, queue) => {
  if (err) {
    // on error
  }

  data.pop((data, next, commit, rollback) => {
    /* work with data */

    // confirm executed and get the next message
    commit(next);

    /** rollback(next); // keep the message and get the next message */
  });

  data.push({test: ok}, (err, filename) => {
    // sent
  });
});

About

A simple queue system based on files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published