Browse Source

update 一个圈圈

master
DengBiao 7 months ago
parent
commit
12db6f56f1
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      rule/one_circles/one_circles_star_level_dividends.go

+ 4
- 4
rule/one_circles/one_circles_star_level_dividends.go View File

@@ -24,10 +24,10 @@ const SettlementStarLevelDividendsLockKey = "settlement_star_level_dividends_loc
func SettlementStarLevelDividends(engine *xorm.Engine, masterId string, ch *rabbit.Channel) (err error) { func SettlementStarLevelDividends(engine *xorm.Engine, masterId string, ch *rabbit.Channel) (err error) {
now := time.Now() now := time.Now()
fmt.Println(now.Hour()) fmt.Println(now.Hour())
//if !(now.Hour() > 2 && now.Hour() < 8) {
// //TODO::只在凌晨一点 ~ 凌晨 8 点运行
// return errors.New("非运行时间")
//}
if !(now.Hour() > 2 && now.Hour() < 8) {
//TODO::只在凌晨一点 ~ 凌晨 8 点运行
return errors.New("非运行时间")
}
//TODO::增加“悲观锁”防止串行 //TODO::增加“悲观锁”防止串行
getString, _ := cache.GetString(SettlementStarLevelDividendsLockKey) getString, _ := cache.GetString(SettlementStarLevelDividendsLockKey)
if getString != "" { if getString != "" {


Loading…
Cancel
Save