refine mindmap prompt (#1808)

### What problem does this PR solve?



### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-08-05 15:33:44 +08:00
committed by GitHub
parent d2213141e0
commit a5c03ccd4c
4 changed files with 5 additions and 11 deletions

View File

@ -142,7 +142,7 @@ class DocumentService(CommonService):
@classmethod
@DB.connection_context()
def get_unfinished_docs(cls):
fields = [cls.model.id, cls.model.process_begin_at, cls.model.parser_config, cls.model.progress_msg]
fields = [cls.model.id, cls.model.process_begin_at, cls.model.parser_config, cls.model.progress_msg, cls.model.run]
docs = cls.model.select(*fields) \
.where(
cls.model.status == StatusEnum.VALID.value,
@ -311,7 +311,7 @@ class DocumentService(CommonService):
prg = 0
finished = True
bad = 0
status = TaskStatus.RUNNING.value
status = d["run"]#TaskStatus.RUNNING.value
for t in tsks:
if 0 <= t.progress < 1:
finished = False