first commit
This commit is contained in:
7
batch/util/debug.js
Normal file
7
batch/util/debug.js
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var debug = require('debug');
|
||||
|
||||
module.exports = function batchDebug (ns) {
|
||||
return debug(['batch', ns].join(':'));
|
||||
};
|
||||
11
batch/util/forever.js
Normal file
11
batch/util/forever.js
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function forever(fn, done) {
|
||||
function next(err) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
fn(next);
|
||||
}
|
||||
next();
|
||||
};
|
||||
Reference in New Issue
Block a user