Skip to content

Commit

Permalink
update 优化转发重试
Browse files Browse the repository at this point in the history
  • Loading branch information
gallonyin committed Aug 19, 2023
1 parent 253d9fd commit 6e1c2b9
Showing 1 changed file with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ object WeworkOperationImpl {
} else {
LogUtils.d("$title: 转发失败 $originalContent")
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "$title: 转发失败 $originalContent", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand All @@ -224,6 +225,7 @@ object WeworkOperationImpl {
} else {
LogUtils.d("$title: 转发失败 $originalContent")
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "$title: 转发失败 $originalContent", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -476,9 +478,11 @@ object WeworkOperationImpl {
} else {
LogUtils.e("微盘文件转发失败: $objectName")
if (retryCount > 0) {
goHome()
return pushMicroDiskImage(message, titleList, objectName, extraText, retryCount - 1)
}
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "微盘文件转发失败: $objectName", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -541,6 +545,7 @@ object WeworkOperationImpl {
} else {
LogUtils.e("微盘文件转发失败: $objectName")
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "微盘文件转发失败: $objectName", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -589,9 +594,11 @@ object WeworkOperationImpl {
} else {
LogUtils.e("转发失败")
if (retryCount > 0) {
return pushMicroDiskImage(message, titleList, objectName, extraText, retryCount - 1)
goHome()
return pushMicroprogram(message, titleList, objectName, receivedContent, originalContent, fileUrl, extraText, retryCount - 1)
}
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "转发失败: $objectName", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -644,6 +651,7 @@ object WeworkOperationImpl {
} else {
LogUtils.e("微盘文件转发失败: $objectName")
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "微盘文件转发失败: $objectName", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -737,9 +745,11 @@ object WeworkOperationImpl {
} else {
LogUtils.e("文件转发失败: $objectName")
if (retryCount > 0) {
goHome()
return pushFile(message, titleList, objectName, fileUrl, fileBase64, fileType, extraText, retryCount - 1)
}
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "文件转发失败: $objectName", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -805,9 +815,11 @@ object WeworkOperationImpl {
} else {
LogUtils.e("文件转发失败: $objectName")
if (retryCount > 0) {
goHome()
return pushFile(message, titleList, objectName, fileUrl, fileBase64, fileType, extraText, retryCount - 1)
}
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "文件转发失败: $objectName", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -857,9 +869,11 @@ object WeworkOperationImpl {
} else {
LogUtils.e("转发失败")
if (retryCount > 0) {
return pushMicroDiskImage(message, titleList, objectName, extraText, retryCount - 1)
goHome()
return pushLink(message, titleList, objectName, receivedContent, originalContent, fileUrl, extraText, retryCount - 1)
}
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "转发失败: $objectName", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -1085,6 +1099,7 @@ object WeworkOperationImpl {
} else {
LogUtils.e("$groupName: 转发失败")
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "$groupName: 转发失败", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -1217,6 +1232,7 @@ object WeworkOperationImpl {
} else {
LogUtils.e("$title: 转发失败")
uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "$title: 转发失败", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down Expand Up @@ -1597,6 +1613,7 @@ object WeworkOperationImpl {
} else {
LogUtils.e("未找到保存并发送按钮")
uploadCommandResult(message, ExecCallbackBean.ERROR_BUTTON, "未找到保存并发送按钮", startTime, listOf(), titleList)
goHome()
return false
}
} else {
Expand Down

0 comments on commit 6e1c2b9

Please sign in to comment.