//You may be tempted to do this...
var fs = require('fs');
var trans = db.startTransaction();
trans.query("INSERT ...", [...], function(err, info) {
fs.readFile("foobar.txt", function(err, data) {
//By now, it's too late to use `trans`
if(data == "something")
trans.commit();
else
trans.rollback();
});
//The query callback is now done!! This is your last chance
//to call `commit` or `rollback`
}).execute();
Maybe implement Queue.pause() and Queue.resume() functions?
For example, you can't do something like this...
Maybe implement Queue.pause() and Queue.resume() functions?