Работа над WebWorker и DbSearcher

This commit is contained in:
Book Pauk
2022-08-18 18:54:56 +07:00
parent 61975b6f2b
commit 676e6f6909
4 changed files with 303 additions and 10 deletions

View File

@@ -98,13 +98,10 @@ class WebSocketController {
}
async getConfig(req, ws) {
if (Array.isArray(req.params)) {
const paramsSet = new Set(req.params);
const config = _.pick(this.config, this.config.webConfigParams);
config.dbConfig = await this.webWorker.dbConfig();
this.send(_.pick(this.config, this.config.webConfigParams.filter(x => paramsSet.has(x))), req, ws);
} else {
throw new Error('params is not an array');
}
this.send(config, req, ws);
}
async getWorkerState(req, ws) {