mirror of
https://github.com/james-m-jordan/morphik-core.git
synced 2025-05-09 19:32:38 +00:00
Mark ingest_text as complete when ingestion finished
This commit is contained in:
parent
4b9869baf7
commit
1c79a62fb2
@ -636,6 +636,15 @@ class DocumentService:
|
||||
await self._store_chunks_and_doc(chunk_objects, doc, use_colpali, chunk_objects_multivector)
|
||||
logger.debug(f"Successfully stored text document {doc.external_id}")
|
||||
|
||||
# Update the document status to completed after successful storage
|
||||
# This matches the behavior in ingestion_worker.py
|
||||
doc.system_metadata["status"] = "completed"
|
||||
doc.system_metadata["updated_at"] = datetime.now(UTC)
|
||||
await self.db.update_document(
|
||||
document_id=doc.external_id, updates={"system_metadata": doc.system_metadata}, auth=auth
|
||||
)
|
||||
logger.debug(f"Updated document status to 'completed' for {doc.external_id}")
|
||||
|
||||
return doc
|
||||
|
||||
# TODO: check if it's unused. if so, remove it.
|
||||
|
Loading…
x
Reference in New Issue
Block a user