compute indexes in child processes

This commit is contained in:
ansuz
2020-03-19 10:46:18 -04:00
parent d1b16af160
commit 4522ffa18a
4 changed files with 280 additions and 117 deletions

View File

@@ -238,6 +238,19 @@ module.exports.create = function (config, cb) {
if (err) { throw new Error(err); }
Env.blobStore = blob;
}));
}).nThen(function (w) {
HK.initializeIndexWorkers(Env, {
filePath: config.filePath,
archivePath: config.archivePath,
channelExpirationMs: config.channelExpirationMs,
verbose: config.verbose,
openFileLimit: config.openFileLimit,
}, w(function (err, computeIndex) {
if (err) {
throw new Error(err);
}
Env.computeIndex = computeIndex;
}));
}).nThen(function (w) {
// create a task store
require("./storage/tasks").create(config, w(function (e, tasks) {