瀏覽代碼

fix: task_executor bug fix (#7253)

### What problem does this PR solve?

The lock is not released correctly when task_exectuor is abnormal

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [ ] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
tags/v0.19.0
benni82 6 月之前
父節點
當前提交
216cd7474b
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. 4
    0
      rag/svr/task_executor.py

+ 4
- 0
rag/svr/task_executor.py 查看文件

@@ -674,6 +674,8 @@ async def report_status():
REDIS_CONN.delete(consumer_name)
except Exception:
logging.exception("report_status got exception")
finally:
redis_lock.release()
await trio.sleep(30)


@@ -702,6 +704,8 @@ def recover_pending_tasks():
stop_event.wait(60)
except Exception:
logging.warning("recover_pending_tasks got exception")
finally:
redis_lock.release()


async def main():

Loading…
取消
儲存