fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit 19ae7e1cae - Show all commits

View file

@ -717,9 +717,9 @@ export class GBDeployer implements IGBDeployer {
// Prepares search. // Prepares search.
let release; let release;
try { try {
GBLogEx.info(instance.instanceId, `Acquiring rebuildIndex mutex...`); // GBLogEx.info(instance.instanceId, `Acquiring rebuildIndex mutex...`);
release = await GBServer.globals.indexSemaphore.acquire(); // release = await GBServer.globals.indexSemaphore.acquire();
GBLogEx.info(instance.instanceId, `Acquire rebuildIndex done.`); // GBLogEx.info(instance.instanceId, `Acquire rebuildIndex done.`);
const key = instance.searchKey ? instance.searchKey : GBServer.globals.minBoot.instance.searchKey; const key = instance.searchKey ? instance.searchKey : GBServer.globals.minBoot.instance.searchKey;
const searchIndex = instance.searchIndex ? instance.searchIndex : GBServer.globals.minBoot.instance.searchIndex; const searchIndex = instance.searchIndex ? instance.searchIndex : GBServer.globals.minBoot.instance.searchIndex;
@ -773,12 +773,12 @@ export class GBDeployer implements IGBDeployer {
} }
await search.createIndex(searchSchema, dsName); await search.createIndex(searchSchema, dsName);
release(); // release();
GBLogEx.info(instance.instanceId, `Released rebuildIndex mutex.`); GBLogEx.info(instance.instanceId, `Released rebuildIndex mutex.`);
} catch { } catch {
if (release) { // if (release) {
release(); // release();
} // }
} }
} }