petercat-ai / petercat

A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories
https://petercat.ai
MIT License
605 stars 18 forks source link

太多排队任务 #362

Open xingwanying opened 2 months ago

xingwanying commented 2 months ago

Describe the bug 入库任务被阻塞了,一直在排队

Expected behavior

需要一个失败重试的补偿机制, 比如超时任务置为失败状态,最多重试3次, 还是失败就直接跳过

Screenshots

image

petercat-assistant[bot] commented 2 months ago

It appears that there are no other similar issues related to task blocking in the repository besides the one you've reported.

To address your issue, I recommend implementing a retry mechanism for tasks that fail or timeout. Here are some steps you can consider:

  1. Identify Timeout and Failure Conditions: Determine what constitutes a timeout or failure for your tasks.
  2. Implement Retry Logic: Add logic to retry the task up to a maximum of three times if it fails or times out.
  3. Skip After Maximum Retries: If the task still fails after the maximum retries, log the failure and skip the task.

If you need further assistance with the implementation or have any other questions, feel free to @ me for help!