const opts = {
autoexec: true
}
const queue = new FSLock(opts);Options :
- autoexec : (default : true) - When true, will automatically execute .start()
const job = queue.add('Directory.create','./myfolder');Will get the next job
- index : (default:0) - Specify the index to get
const job = queue.get()Will process all next job except if stopped during processing
await queue.processAll();Will process next job only.
- index : (default:0) - Specify the number of job to skip.
await queue.processNext();Allow to start processing all in continuous
queue.start()Allow to stop all process, including processing all at it's next tick
queue.stop();