queue-file
v0.0.3
Published
Simple queue based on JSON files
Downloads
2
Readme
Queue
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
});
});