Commit 4ab025c4 authored by crazywoola's avatar crazywoola

feat: add more status

parent cc17de4f
......@@ -411,7 +411,7 @@ class DocumentService:
def get_error_documents_by_dataset_id(dataset_id: str) -> list[Document]:
documents = db.session.query(Document).filter(
Document.dataset_id == dataset_id,
Document.indexing_status == 'error'
Document.indexing_status == 'error' or Document.indexing_status == 'paused' or Document.indexing_status == 'waiting'
).all()
return documents
......
......@@ -28,7 +28,7 @@ const indexStateReducer = (state: IIndexState, action: IAction) => {
case 'retry':
return {
...state,
value: 'retrying',
value: 'retry',
}
case 'success':
return {
......@@ -82,7 +82,7 @@ const RetryButton: FC<Props> = (
className={
classNames(
'text-primary-600 font-semibold text-sm cursor-pointer',
indexState.value === 'retrying' && 'text-gray-500 cursor-not-allowed',
indexState.value === 'retry' && '!text-gray-500 !cursor-not-allowed',
)
}
onClick={indexState.value === 'error' ? onRetryErrorDocs : undefined}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment