From d8f84f35f3ab17f40493c83fafcb01e4034267d2 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 14 Nov 2022 21:14:54 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=BB=BF=E8=89=B2=E7=A7=AF=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/block_green_chain_settlement.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rule/block_green_chain_settlement.go b/rule/block_green_chain_settlement.go index dba8eae..493f396 100644 --- a/rule/block_green_chain_settlement.go +++ b/rule/block_green_chain_settlement.go @@ -42,7 +42,7 @@ func DailySettlementBlockGreenChain(engine *xorm.Engine, mid string, isTask bool today := now.Format("2006-01-02") fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", now.Hour()) - if isTask && (now.Hour() > 8) { + if isTask && (now.Hour() > 22) && (now.Hour() < 24) { //TODO::只在凌晨一点 ~ 凌晨 8 点运行 return errors.New("非运行时间") } @@ -79,7 +79,7 @@ func DailySettlementBlockGreenChain(engine *xorm.Engine, mid string, isTask bool fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", "上一次结算未执行完") return errors.New("上一次结算未执行完") } - cache.SetEx(PessimismLockKeyForGreen, PessimismLockValueForGreen, 3600*8) //8小时 + cache.SetEx(PessimismLockKeyForGreen, PessimismLockValueForGreen, 3600*1) //8小时 //TODO::关闭系统 zhios_order_relate_utils.CurlPost("http://zhios-app:5000/api/v1/check_app_over_time", map[string]string{ @@ -214,7 +214,7 @@ func DailySettlementBlockGreenChain(engine *xorm.Engine, mid string, isTask bool "is_close": "0", }, map[string]string{}) - //cache.Del(PessimismLockKeyForGreen) + cache.Del(PessimismLockKeyForGreen) fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>绿色积分结束<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") return nil