Accept Merge Request #175: (su -> mark)

Merge Request: 同步错误返回
Created By: @苏尹岚
Accepted By: @苏尹岚
URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/175
This commit is contained in:
苏尹岚
2020-02-04 17:03:31 +08:00

View File

@@ -655,11 +655,11 @@ func buildSetFinishHook(task tasksch.ITask, ctx *jxcontext.Context) {
if task.GetErr() != nil {
noticeMsg += utils.Format4Output(buildErrMsgJson(task), true)
}
} else {
noticeMsg = "您的同步任务执行完成,没有错误返回。"
}
if len(task.GetFailedList()) != 0 {
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "同步错误返回", noticeMsg)
}
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "同步错误返回", noticeMsg)
}
} else {
if time.Now().Hour() >= 20 || time.Now().Hour() < 7 {