mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 03:26:47 +08:00
feat(server): increase embedding jobs concurrency & handle empty content after trim (#12574)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Improvements** - Increased the default concurrency for background tasks, enhancing processing efficiency. - Improved handling of empty or unsupported documents to ensure consistent processing. - Optimized document filtering to exclude certain documents from processing, improving performance. - **Bug Fixes** - Enhanced detection of empty document summaries, reducing errors during processing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -199,6 +199,21 @@ test('should insert and search embedding', async t => {
|
||||
);
|
||||
t.snapshot(afterAddIgnoreDocs.length, 'should not find docs to embed');
|
||||
}
|
||||
|
||||
{
|
||||
const docId = `foo$bar`;
|
||||
await t.context.doc.upsert({
|
||||
spaceId: workspace.id,
|
||||
docId: docId,
|
||||
blob: Uint8Array.from([1, 2, 3]),
|
||||
timestamp: Date.now(),
|
||||
editorId: user.id,
|
||||
});
|
||||
const results = await t.context.copilotWorkspace.findDocsToEmbed(
|
||||
workspace.id
|
||||
);
|
||||
t.false(results.includes(docId), 'docs containing `$` should be excluded');
|
||||
}
|
||||
});
|
||||
|
||||
test('should check need to be embedded', async t => {
|
||||
|
||||
Reference in New Issue
Block a user