TRUEREF-0023 rewrite indexing pipeline - parallel reads - serialized writes

This commit is contained in:
Giancarmine Salucci
2026-04-02 09:49:38 +02:00
parent 9525c58e9a
commit f86be4106b
68 changed files with 5042 additions and 3131 deletions

View File

@@ -6,7 +6,7 @@ import { EmbeddingSettingsService } from '$lib/server/services/embedding-setting
export const load: PageServerLoad = async () => {
const db = getClient();
const service = new EmbeddingSettingsService(db);
const settings = EmbeddingSettingsDtoMapper.toDto(service.getSettings());
@@ -20,11 +20,9 @@ export const load: PageServerLoad = async () => {
// Read indexing concurrency setting
let indexingConcurrency = 2;
const concurrencyRow = db
.prepare<[], { value: string }>(
"SELECT value FROM settings WHERE key = 'indexing.concurrency'"
)
.prepare<[], { value: string }>("SELECT value FROM settings WHERE key = 'indexing.concurrency'")
.get();
if (concurrencyRow && concurrencyRow.value) {
try {
const parsed = JSON.parse(concurrencyRow.value);
@@ -43,4 +41,4 @@ export const load: PageServerLoad = async () => {
localProviderAvailable,
indexingConcurrency
};
};
};