Merge branch 'soon' into staging

This commit is contained in:
yflory
2020-03-23 12:33:17 +01:00
18 changed files with 1031 additions and 183 deletions

View File

@@ -984,16 +984,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
@@ -1038,6 +1039,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) {