A simple single-process non-persistent work-queue that can get its own jobs
An in-process non-persistent job queue that fetches its own work.
var BatchThrasher = require'thrasher'BatchThrasher;var thrasher =var someJobs =id : 1 sometext: "foo"id : 2 sometext: "bar"id : 3 sometext: "baz"cbsomeJobs; // call-back with a list of jobs to processconsole.log"got a job! " job;done; // call done() when each job is completed.console.log"batch processed successfully!";makeInterval : 2 * 60 * 1000 // the time between when it tries to make jobs (in ms)retryInterval : 2000 // the time between retries on failed jobs (in ms)asynchWorker : false // whether the jobs can all be processed at the same timeasynchronousBatches : true // whether more jobs can be made before the last batch of jobs// has been processed.;// run it!thrasherstart;