From 9192755edb570c07f7df04a002e77b0875535872 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 27 Jul 2024 17:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- super_cloud_issuance/svc/svc_deal_call_back.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/super_cloud_issuance/svc/svc_deal_call_back.go b/super_cloud_issuance/svc/svc_deal_call_back.go index 702730f..b1589cc 100644 --- a/super_cloud_issuance/svc/svc_deal_call_back.go +++ b/super_cloud_issuance/svc/svc_deal_call_back.go @@ -14,6 +14,7 @@ import ( "errors" "fmt" "github.com/gin-gonic/gin" + "math/rand" "time" ) @@ -63,6 +64,7 @@ func (dealSuperCloudIssuanceCallBackService *DealSuperCloudIssuanceCallBackServi "master_id": c.GetString("mid"), "content": req.Data.Content, } + time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) utils.FilePutContents("cloud", utils.SerializeStr(args)) chain := chain_transfer.TurnChain(MasterDb(c), db.Db, db2.ZhimengDb, args) utils.FilePutContents("cloud", utils.SerializeStr(chain)) @@ -243,6 +245,7 @@ func (dealSuperCloudIssuanceCallBackService *DealSuperCloudIssuanceCallBackServi "master_id": dealSuperCloudIssuanceCallBackService.Context.GetString("mid"), "content": req.Data.Content, } + time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) utils.FilePutContents("cloud_source", utils.SerializeStr(args)) chain := chain_transfer.TurnChain(MasterDb(dealSuperCloudIssuanceCallBackService.Context), db.Db, db2.ZhimengDb, args) utils.FilePutContents("cloud_source", utils.SerializeStr(chain))