From 43ae1c2efa6cf6e75638dd5ec444fe23a906831a Mon Sep 17 00:00:00 2001 From: Rosy-zhudan Date: Mon, 26 Aug 2019 17:30:35 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B5=8B=E8=AF=95pprof?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/misc/misc2.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc2.go b/business/jxstore/misc/misc2.go index 5fc8a9a67..6b6f9b3a2 100644 --- a/business/jxstore/misc/misc2.go +++ b/business/jxstore/misc/misc2.go @@ -14,11 +14,14 @@ import ( "git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/business/partner/putils" "git.rosy.net.cn/jx-callback/globals" + + _ "net/http/pprof" + "net/http" ) const ( enableScheduleRefreshStore = false - taskParallelCount = 2 + taskParallelCount = 4 specialSkuNameKeyWord = "温馨提示" startOpStoreStockNumber = 0 endOpStoreStockNumber = model.MaxStoreSkuStockQty @@ -199,6 +202,9 @@ func GetFilterStoreList(storeList []*cms.StoreExt, vendorMap, storeIDMap map[int } func StartOrEndOpStore(ctx *jxcontext.Context, isStart bool, vendorIDList []int, storeIDList []int, startTime, endTime int16, isAsync, isContinueWhenError bool) (retVal interface{}, err error) { + go func() { + http.ListenAndServe("127.0.0.1:8086", nil) + }() storeList, err := GetStoreList(ctx) vendorMap := make(map[int]bool) for _, vendorID := range vendorIDList { From 69cd849bbd12e0f1f5f4d78049250bdd26272684 Mon Sep 17 00:00:00 2001 From: Rosy-zhudan Date: Mon, 26 Aug 2019 17:46:15 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=85=B3=E9=97=ADPPROF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/misc/misc2.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/business/jxstore/misc/misc2.go b/business/jxstore/misc/misc2.go index 6b6f9b3a2..0fef29d27 100644 --- a/business/jxstore/misc/misc2.go +++ b/business/jxstore/misc/misc2.go @@ -15,8 +15,8 @@ import ( "git.rosy.net.cn/jx-callback/business/partner/putils" "git.rosy.net.cn/jx-callback/globals" - _ "net/http/pprof" - "net/http" + // _ "net/http/pprof" + // "net/http" ) const ( @@ -202,9 +202,9 @@ func GetFilterStoreList(storeList []*cms.StoreExt, vendorMap, storeIDMap map[int } func StartOrEndOpStore(ctx *jxcontext.Context, isStart bool, vendorIDList []int, storeIDList []int, startTime, endTime int16, isAsync, isContinueWhenError bool) (retVal interface{}, err error) { - go func() { - http.ListenAndServe("127.0.0.1:8086", nil) - }() + // go func() { + // http.ListenAndServe("127.0.0.1:8086", nil) + // }() storeList, err := GetStoreList(ctx) vendorMap := make(map[int]bool) for _, vendorID := range vendorIDList { From 73fbb43157008a81ffb8b2d6bf98fbd3e9b94654 Mon Sep 17 00:00:00 2001 From: Rosy-zhudan Date: Mon, 26 Aug 2019 17:48:50 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=89=93=E5=BC=80=E8=B0=83=E8=AF=95PPROF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/misc/misc2.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/business/jxstore/misc/misc2.go b/business/jxstore/misc/misc2.go index 0fef29d27..6b6f9b3a2 100644 --- a/business/jxstore/misc/misc2.go +++ b/business/jxstore/misc/misc2.go @@ -15,8 +15,8 @@ import ( "git.rosy.net.cn/jx-callback/business/partner/putils" "git.rosy.net.cn/jx-callback/globals" - // _ "net/http/pprof" - // "net/http" + _ "net/http/pprof" + "net/http" ) const ( @@ -202,9 +202,9 @@ func GetFilterStoreList(storeList []*cms.StoreExt, vendorMap, storeIDMap map[int } func StartOrEndOpStore(ctx *jxcontext.Context, isStart bool, vendorIDList []int, storeIDList []int, startTime, endTime int16, isAsync, isContinueWhenError bool) (retVal interface{}, err error) { - // go func() { - // http.ListenAndServe("127.0.0.1:8086", nil) - // }() + go func() { + http.ListenAndServe("127.0.0.1:8086", nil) + }() storeList, err := GetStoreList(ctx) vendorMap := make(map[int]bool) for _, vendorID := range vendorIDList { From fc9e032096319d64c6e7bf3e411bf5af91de1164 Mon Sep 17 00:00:00 2001 From: Rosy-zhudan Date: Tue, 27 Aug 2019 09:03:35 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=8A=A0SLEEP=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/misc/misc2.go | 1 + 1 file changed, 1 insertion(+) diff --git a/business/jxstore/misc/misc2.go b/business/jxstore/misc/misc2.go index 6b6f9b3a2..45fcb09e2 100644 --- a/business/jxstore/misc/misc2.go +++ b/business/jxstore/misc/misc2.go @@ -265,6 +265,7 @@ func StartOrEndOpStoreEx(ctx *jxcontext.Context, isStart bool, startTime, endTim if isStart { AddOrDelExtraStoreOptime(ctx, vendorID, storeID, vendorStoreID, &storeListValue.Store, startOpStoreTime, endOpStoreTime, true) } + time.Sleep(time.Second * 3) } } } From 311f39d5ae4d83ba6d279122df2c3f43d37916b7 Mon Sep 17 00:00:00 2001 From: Rosy-zhudan Date: Tue, 27 Aug 2019 09:18:19 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/misc/misc2.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/business/jxstore/misc/misc2.go b/business/jxstore/misc/misc2.go index 45fcb09e2..a21ea9c7f 100644 --- a/business/jxstore/misc/misc2.go +++ b/business/jxstore/misc/misc2.go @@ -14,9 +14,6 @@ import ( "git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/business/partner/putils" "git.rosy.net.cn/jx-callback/globals" - - _ "net/http/pprof" - "net/http" ) const ( @@ -202,9 +199,6 @@ func GetFilterStoreList(storeList []*cms.StoreExt, vendorMap, storeIDMap map[int } func StartOrEndOpStore(ctx *jxcontext.Context, isStart bool, vendorIDList []int, storeIDList []int, startTime, endTime int16, isAsync, isContinueWhenError bool) (retVal interface{}, err error) { - go func() { - http.ListenAndServe("127.0.0.1:8086", nil) - }() storeList, err := GetStoreList(ctx) vendorMap := make(map[int]bool) for _, vendorID := range vendorIDList { @@ -265,7 +259,6 @@ func StartOrEndOpStoreEx(ctx *jxcontext.Context, isStart bool, startTime, endTim if isStart { AddOrDelExtraStoreOptime(ctx, vendorID, storeID, vendorStoreID, &storeListValue.Store, startOpStoreTime, endOpStoreTime, true) } - time.Sleep(time.Second * 3) } } }