compute metadata in the same child process that builds indexes

This commit is contained in:
ansuz
2020-03-24 17:43:15 -04:00
parent 479b76f848
commit 471e374533
4 changed files with 95 additions and 54 deletions

View File

@@ -18,15 +18,7 @@ Data.getMetadataRaw = function (Env, channel /* channelName */, _cb) {
}
Env.batchMetadata(channel, cb, function (done) {
var ref = {};
var lineHandler = Meta.createLineHandler(ref, Env.Log.error);
return void Env.msgStore.readChannelMetadata(channel, lineHandler, function (err) {
if (err) {
// stream errors?
return void done(err);
}
done(void 0, ref.meta);
});
Env.computeMetadata(channel, done);
});
};