每日报警心跳,缺省并发任务数从10改为5。

This commit is contained in:
gazebo
2020-01-17 16:43:05 +08:00
parent f53fc8eefa
commit 4896516cf2
3 changed files with 8 additions and 2 deletions

View File

@@ -148,7 +148,7 @@ func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
} }
} }
func GetServiceInfo(ctx *jxcontext.Context) interface{} { func GetServiceInfo(ctx *jxcontext.Context) map[string]interface{} {
return serviceInfo return serviceInfo
} }

View File

@@ -34,6 +34,9 @@ const (
) )
var ( var (
dailyHeartbeat = []string{
"09:00:00",
}
dailyWorkTimeList = []string{ dailyWorkTimeList = []string{
"20:30:00", "20:30:00",
} }
@@ -158,6 +161,9 @@ func Init() {
ScheduleTimerFunc("GetCheckVendorCookie", func() { ScheduleTimerFunc("GetCheckVendorCookie", func() {
event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{0, 1, 3, 102}, true) event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{0, 1, 3, 102}, true)
}, checkCookieList) }, checkCookieList)
ScheduleTimerFunc("每日报警心跳", func() {
globals.SugarLogger.Warnf("每日报警心跳,这不是报警。启动时间:%s", cms.GetServiceInfo(jxcontext.AdminCtx)["startupTime"])
}, dailyHeartbeat)
} }
ScheduleTimerFunc("AutoSaleStoreSku", func() { ScheduleTimerFunc("AutoSaleStoreSku", func() {
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false) cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)

View File

@@ -10,7 +10,7 @@ import (
) )
const ( const (
DefParallelCount = 10 DefParallelCount = 5
MaxParallelCount = 50 MaxParallelCount = 50
) )