Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: handle the failed task message #600

Merged
merged 3 commits into from
Dec 24, 2024
Merged

refactor: handle the failed task message #600

merged 3 commits into from
Dec 24, 2024

Conversation

xingwanying
Copy link
Contributor

  • 任务失败后最多重试五次

Copy link

vercel bot commented Dec 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 9:19am

Copy link

Walkthrough

此PR引入了一个重试机制,允许任务在失败后最多重试五次。通过在任务类中添加retry_count属性,并在处理失败任务时增加重试逻辑,确保任务在失败时能够自动重试。

Changes

文件 摘要
petercat_utils/rag_helper/git_doc_task.py, petercat_utils/rag_helper/git_issue_task.py, petercat_utils/rag_helper/git_task.py 为任务类添加了retry_count属性,并在初始化时设置默认值为0。
petercat_utils/rag_helper/task.py 修改了get_tasktrigger_task函数以支持重试计数。
server/aws/service.py 进行了代码格式的微调。
subscriber/handler.py 引入了最大重试次数的逻辑,并在任务处理失败时增加重试逻辑。

Copy link

codecov bot commented Dec 20, 2024

Copy link
Contributor

@RaoHai RaoHai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@xingwanying xingwanying merged commit 6605804 into main Dec 24, 2024
4 of 5 checks passed
@xingwanying xingwanying deleted the fix_message branch December 24, 2024 09:52
@xingwanying xingwanying mentioned this pull request Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants