add retry count to task (#2152)

### What problem does this PR solve?


### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Kevin Hu
2024-08-29 13:31:41 +08:00
committed by GitHub
parent 06abef66ef
commit 212bb8e601
2 changed files with 21 additions and 2 deletions

View File

@ -788,6 +788,7 @@ class Task(DataBaseModel):
null=True,
help_text="process message",
default="")
retry_count = IntegerField(default=0)
class Dialog(DataBaseModel):
@ -982,3 +983,10 @@ def migrate_db():
DB.execute_sql('ALTER TABLE llm ADD PRIMARY KEY (llm_name,fid);')
except Exception as e:
pass
try:
migrate(
migrator.add_column('task', 'retry_count', IntegerField(default=0))
)
except Exception as e:
pass