compute indexes in child processes
This commit is contained in:
@@ -1024,16 +1024,17 @@ module.exports.create = function (conf, cb) {
|
||||
// make sure the store's directory exists
|
||||
Fse.mkdirp(env.root, PERMISSIVE, w(function (err) {
|
||||
if (err && err.code !== 'EEXIST') {
|
||||
throw err;
|
||||
throw err; // XXX
|
||||
}
|
||||
}));
|
||||
// make sure the cold storage directory exists
|
||||
Fse.mkdirp(env.archiveRoot, PERMISSIVE, w(function (err) {
|
||||
if (err && err.code !== 'EEXIST') {
|
||||
throw err;
|
||||
throw err; // XXX
|
||||
}
|
||||
}));
|
||||
}).nThen(function () {
|
||||
// XXX leave a place for an error
|
||||
cb({
|
||||
// OLDER METHODS
|
||||
// write a new message to a log
|
||||
@@ -1078,6 +1079,12 @@ module.exports.create = function (conf, cb) {
|
||||
});
|
||||
},
|
||||
|
||||
getWeakLock: function (channelName, _cb) {
|
||||
var cb = Util.once(Util.mkAsync(_cb));
|
||||
if (!isValidChannelId(channelName)) { return void cb(new Error('EINVAL')); }
|
||||
schedule.unordered(channelName, cb);
|
||||
},
|
||||
|
||||
// METHODS for deleting data
|
||||
// remove a channel and its associated metadata log if present
|
||||
removeChannel: function (channelName, cb) {
|
||||
|
||||
Reference in New Issue
Block a user