作者 tangxvhui

小调整

... ... @@ -255,6 +255,8 @@ func AppMessageRun() {
if interval < 0 {
interval = (24 * time.Hour) + interval
}
// interval := 10 * time.Second
timer := time.NewTimer(interval)
for {
<-timer.C
... ... @@ -264,6 +266,6 @@ func AppMessageRun() {
log.Logger.Error("发送关于任务异常的消息通知:" + err.Error())
}
timer.Reset(24 * time.Hour)
log.Logger.Error(fmt.Sprintf("发送关于任务异常的消息通知用时:%v", time.Since(beginTime).Seconds()))
log.Logger.Info(fmt.Sprintf("发送关于任务异常的消息通知用时:%v", time.Since(beginTime).Seconds()))
}
}
... ...
... ... @@ -29,7 +29,6 @@ type MessageExt struct {
// PushInfo 个推
func (serviceGateway *HttplibMmmOpenApiServiceGateway) PushInfo(msgType int, project string, uids []int64, title string, content string) (map[string]interface{}, error) {
// url := strings.Join([]string{"v1", "push", "pushInfo"}, "/")
url := "/v1/push/pushInfo"
serviceGateway.CreateRequest("post", url)
options := &MessageOptions{
... ...