Bladeren bron

update 绿色积分

tags/v3.7.1
DengBiao 2 jaren geleden
bovenliggende
commit
d8f84f35f3
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. +3
    -3
      rule/block_green_chain_settlement.go

+ 3
- 3
rule/block_green_chain_settlement.go Bestand weergeven

@@ -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


Laden…
Annuleren
Opslaan