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