Skip to content

Feat/document processing queue#290

Merged
MasterKenth merged 7 commits into
masterfrom
feat/document-processing-queue
Oct 17, 2025
Merged

Feat/document processing queue#290
MasterKenth merged 7 commits into
masterfrom
feat/document-processing-queue

Conversation

@MasterKenth

Copy link
Copy Markdown
Contributor

Changed file processing for assistants (RAG - chunking + vectorization) to be processed in a separate thread (started/stopped together with the backend process).

…separate thread

refactor files+urls into "document" and run chunking+vectorization in a separate thread in order to
not block "main" thread.

BREAKING CHANGE: endpoint for updating collection content now returns immediately. Status for each
document will have to be queried using GET /api/collections. Structure for files/urls have changed
into documents.
@MasterKenth MasterKenth requested a review from zilaei October 3, 2025 09:40

@zilaei zilaei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a test test_LocalFileDocumentQueueService.py for demonstrating document processing error. I'm not sure if these errors ever will trigger but added the test so that you can look and judge if it's a concern.

Main concern is: Processing fails for any reaqson -> finally tries to remove file -> file locked -> error raised -> Files still in queue.
File look is the main concern but not this might be very unlikely to happen.

Comment thread backend/src/modules/document_queue/LocalFileDocumentQueueService.py Outdated
@MasterKenth MasterKenth merged commit d7be42c into master Oct 17, 2025
2 checks passed
@MasterKenth MasterKenth deleted the feat/document-processing-queue branch October 17, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants