排除每天自动同步
This commit is contained in:
@@ -634,16 +634,18 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, parentTask tasksch.I
|
|||||||
if isAsync {
|
if isAsync {
|
||||||
task.SetFinishHook(func(task tasksch.ITask) {
|
task.SetFinishHook(func(task tasksch.ITask) {
|
||||||
var noticeMsg string
|
var noticeMsg string
|
||||||
if len(task.GetFailedList()) > 10 {
|
if ctx.GetUserName() != "jxadmin" {
|
||||||
downloadURL, _, _ := WirteToExcelBySyncFailed(task)
|
if len(task.GetFailedList()) > 10 {
|
||||||
noticeMsg = fmt.Sprintf("[详情点我]path1=%s\n", downloadURL)
|
downloadURL, _, _ := WirteToExcelBySyncFailed(task)
|
||||||
} else if len(task.GetFailedList()) > 0 && len(task.GetFailedList()) <= 10 {
|
noticeMsg = fmt.Sprintf("[详情点我]path1=%s\n", downloadURL)
|
||||||
if task.GetErr() != nil {
|
} else if len(task.GetFailedList()) > 0 && len(task.GetFailedList()) <= 10 {
|
||||||
noticeMsg = utils.Format4Output(buildErrMsgJson(task), true)
|
if task.GetErr() != nil {
|
||||||
|
noticeMsg = utils.Format4Output(buildErrMsgJson(task), true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user