From 4896516cf23a233ce47b529b4a51cc608e549a7a Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 17 Jan 2020 16:43:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=8A=A5=E8=AD=A6=E5=BF=83?= =?UTF-8?q?=E8=B7=B3=EF=BC=8C=E7=BC=BA=E7=9C=81=E5=B9=B6=E5=8F=91=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=95=B0=E4=BB=8E10=E6=94=B9=E4=B8=BA5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/cms.go | 2 +- business/jxstore/misc/misc.go | 6 ++++++ business/jxutils/tasksch/parallel_task.go | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index c1e92411a..f61780c34 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -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 } diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 0e9dde7aa..b3f9a987d 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -34,6 +34,9 @@ const ( ) var ( + dailyHeartbeat = []string{ + "09:00:00", + } dailyWorkTimeList = []string{ "20:30:00", } @@ -158,6 +161,9 @@ func Init() { ScheduleTimerFunc("GetCheckVendorCookie", func() { event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{0, 1, 3, 102}, true) }, checkCookieList) + ScheduleTimerFunc("每日报警心跳", func() { + globals.SugarLogger.Warnf("每日报警心跳,这不是报警。启动时间:%s", cms.GetServiceInfo(jxcontext.AdminCtx)["startupTime"]) + }, dailyHeartbeat) } ScheduleTimerFunc("AutoSaleStoreSku", func() { cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false) diff --git a/business/jxutils/tasksch/parallel_task.go b/business/jxutils/tasksch/parallel_task.go index 00723b8f5..50b30da1b 100644 --- a/business/jxutils/tasksch/parallel_task.go +++ b/business/jxutils/tasksch/parallel_task.go @@ -10,7 +10,7 @@ import ( ) const ( - DefParallelCount = 10 + DefParallelCount = 5 MaxParallelCount = 50 )