|
|
@@ -63,13 +63,13 @@ func DailySettlementBlockStarChain(engine *xorm.Engine, mid string, isTask bool) |
|
|
|
} |
|
|
|
|
|
|
|
//TODO::增加“悲观锁”防止串行 |
|
|
|
getString, err := cache.GetString(PessimismLockKey) |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
getString, _ := cache.GetString(PessimismLockKey) |
|
|
|
//if err != nil { |
|
|
|
// return err |
|
|
|
//} |
|
|
|
if getString == PessimismLockValue { |
|
|
|
fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", "上一次结算未执行完") |
|
|
|
return errors.New("非运行时间") |
|
|
|
return errors.New("上一次结算未执行完") |
|
|
|
} |
|
|
|
cache.SetEx(PessimismLockKey, PessimismLockValue, 3600*8) //8小时 |
|
|
|
|
|
|
|