From 8d5792d456e2c08cc22a48f307f5af5dd21a9225 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sat, 22 Oct 2022 19:50:51 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=91=D0=94=20=D0=B2=20=D1=81=D1=82=D0=B0=D1=82=D0=B8=D1=81?= =?UTF-8?q?=D1=82=D0=B8=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Search/Search.vue | 2 ++ server/config/base.js | 6 +++++- server/core/InpxHashCreator.js | 6 +----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue index a8b615a..5413311 100644 --- a/client/components/Search/Search.vue +++ b/client/components/Search/Search.vue @@ -697,6 +697,8 @@ class Search {
Уникальных названий серий:
${stat.seriesCount}
Найдено жанров:
${stat.genreCount}
Найдено языков:
${stat.langCount}
+
+
Версия поисковой БД:
${this.config.dbVersion}
`; info += ` diff --git a/server/config/base.js b/server/config/base.js index 77c0d8a..ec38128 100644 --- a/server/config/base.js +++ b/server/config/base.js @@ -14,7 +14,11 @@ module.exports = { bookReadLink: '', loggingEnabled: true, + //поправить в случае, если были критические изменения в DbCreator + //иначе будет рассинхронизация между сервером и клиентом на уровне БД + dbVersion: '3', dbCacheSize: 5, + maxPayloadSize: 500,//in MB maxFilesDirSize: 1024*1024*1024,//1Gb queryCacheEnabled: true, @@ -22,7 +26,7 @@ module.exports = { inpxCheckInterval: 60,//minutes lowMemoryMode: false, - webConfigParams: ['name', 'version', 'branch', 'bookReadLink'], + webConfigParams: ['name', 'version', 'branch', 'bookReadLink', 'dbVersion'], allowRemoteLib: false, remoteLib: false, diff --git a/server/core/InpxHashCreator.js b/server/core/InpxHashCreator.js index 0248615..418f556 100644 --- a/server/core/InpxHashCreator.js +++ b/server/core/InpxHashCreator.js @@ -2,10 +2,6 @@ const fs = require('fs-extra'); const utils = require('./utils'); -//поправить в случае, если были критические изменения в DbCreator -//иначе будет рассинхронизация между сервером и клиентом на уровне БД -const dbCreatorVersion = '3'; - class InpxHashCreator { constructor(config) { this.config = config; @@ -18,7 +14,7 @@ class InpxHashCreator { if (await fs.pathExists(config.inpxFilterFile)) inpxFilterHash = await utils.getFileHash(config.inpxFilterFile, 'sha256', 'hex'); - const joinedHash = dbCreatorVersion + inpxFilterHash + + const joinedHash = this.config.dbVersion + inpxFilterHash + await utils.getFileHash(config.inpxFile, 'sha256', 'hex'); return utils.getBufHash(joinedHash, 'sha256', 'hex');