Improve index attempt display

This commit is contained in:
Weves
2023-11-01 18:31:18 -07:00
committed by Chris Weaver
parent d9adee168b
commit e8f778ccb5
6 changed files with 52 additions and 55 deletions

View File

@ -311,7 +311,8 @@ class IndexAttemptRequest(BaseModel):
class IndexAttemptSnapshot(BaseModel):
id: int
status: IndexingStatus | None
new_docs_indexed: int
new_docs_indexed: int # only includes completely new docs
total_docs_indexed: int # includes docs that are updated
error_msg: str | None
time_started: str | None
time_updated: str
@ -324,6 +325,7 @@ class IndexAttemptSnapshot(BaseModel):
id=index_attempt.id,
status=index_attempt.status,
new_docs_indexed=index_attempt.new_docs_indexed or 0,
total_docs_indexed=index_attempt.total_docs_indexed or 0,
error_msg=index_attempt.error_msg,
time_started=index_attempt.time_started.isoformat()
if index_attempt.time_started