From 7a23b2985131b19a72ef43989501b43db3905ffa Mon Sep 17 00:00:00 2001 From: dengbiao Date: Tue, 24 Dec 2024 14:18:28 +0800 Subject: [PATCH] update --- rule/egg_energy/star_level_dividends.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rule/egg_energy/star_level_dividends.go b/rule/egg_energy/star_level_dividends.go index 35c1add..0961edf 100644 --- a/rule/egg_energy/star_level_dividends.go +++ b/rule/egg_energy/star_level_dividends.go @@ -24,10 +24,10 @@ const SettlementStarLevelDividendsLockKey = "settlement_star_level_dividends_loc func SettlementStarLevelDividends(engine *xorm.Engine, ch *rabbit.Channel) (err error) { now := time.Now() fmt.Println(now.Hour()) - //if !(now.Hour() > 1 && now.Hour() < 8) { - // //TODO::只在凌晨1点 ~ 凌晨 8 点运行 - // return errors.New("非运行时间") - //} + if !(now.Hour() > 1 && now.Hour() < 8) { + //TODO::只在凌晨1点 ~ 凌晨 8 点运行 + return errors.New("非运行时间") + } //TODO::增加“悲观锁”防止串行 getString, _ := cache.GetString(SettlementStarLevelDividendsLockKey) if getString != "" {