-
Notifications
You must be signed in to change notification settings - Fork 1
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
Lark 文档导出任务失败缺少重试策略 #2
Labels
Comments
@yoctocell 这个是考核任务的延续,不着急,只是先记在这里,等你有时间了瞅一眼吧~ |
我查看了近几周在文档导出时出现过的异常,有多数是因网络方面(即
Lark API的所有错误码 |
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#1 中对请求 Lark Open API 的函数都增加了重试,然而并没有完整的覆盖所有的失败情况:
如果一个文档的导出任务成功创建了,但是 Lark [执行这个任务的时候失败了,那么用来查询导出任务结果的接口 将会返回一个错误码。此时代码中
wait_task
函数会抛出一个LarkOpenApiError
异常。重复查询这个任务的结果也会再次抛出异常,因为 Lark 不会自动重试失败的任务。当前的重试策略是对任何抛出了LarkOpenApiError
异常的调用都进行指数退行重试。这里有两个问题:
LarkOpenApiError
异常合理吗?是不是应该用其他类型的异常?The text was updated successfully, but these errors were encountered: