Hi, I'm trying to have more that one reader on the same queue and when I start the second reader, it fail:
reader.js code:
const FileQueue = require("fileq");
var queue = FileQueue.from("queue", {"path": __dirname });
var i=0;
setInterval(()=>{
queue.peek((err,entry)=>{
console.log(entry);
});
},100);
Then try to run this code in 2 separated terminals as "node reader.js" ...
The first one run ok, but the second response with the below
Error:
/node_modules/levelup/lib/levelup.js:119
return callback(new OpenError(err))
^
Error [OpenError]: IO error: lock //queue/LOCK: Resource temporarily unavailable
at //node_modules/levelup/lib/levelup.js:119:23
at //node_modules/abstract-leveldown/abstract-leveldown.js:38:14
at //node_modules/deferred-leveldown/deferred-leveldown.js:31:21
at //node_modules/abstract-leveldown/abstract-leveldown.js:38:14
Emitted 'error' event on LevelUP instance at:
at //node_modules/levelup/lib/levelup.js:60:19
at //node_modules/levelup/lib/levelup.js:119:14
at //node_modules/abstract-leveldown/abstract-leveldown.js:38:14
at //node_modules/deferred-leveldown/deferred-leveldown.js:31:21
at //node_modules/abstract-leveldown/abstract-leveldown.js:38:14
Hi, I'm trying to have more that one reader on the same queue and when I start the second reader, it fail:
reader.js code:
Then try to run this code in 2 separated terminals as "node reader.js" ...
The first one run ok, but the second response with the below
Error: