解决v5api返回报错问题
This commit is contained in:
		
							parent
							
								
									6cb56dab4f
								
							
						
					
					
						commit
						a3b1a527e7
					
				@ -267,9 +267,9 @@ func (mx *MaX) SetToKey() ([]interface{}, error) {
 | 
			
		||||
// 保证同一个 period, keyName ,在一个周期里,SaveToSortSet只会被执行一次
 | 
			
		||||
func (core *Core) SaveUniKey(period string, keyName string, extt time.Duration, tsi int64, cl *Candle) {
 | 
			
		||||
	refName := keyName + "|refer"
 | 
			
		||||
	refRes, _ := core.RedisCli.GetSet(refName, 1).Result()
 | 
			
		||||
	refRes, err := core.RedisCli.GetSet(refName, 1).Result()
 | 
			
		||||
	core.RedisCli.Expire(refName, extt)
 | 
			
		||||
	if len(refRes) != 0 {
 | 
			
		||||
	if len(refRes) != 0 || err != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	cl.ToStruct(core)
 | 
			
		||||
@ -278,7 +278,7 @@ func (core *Core) SaveUniKey(period string, keyName string, extt time.Duration,
 | 
			
		||||
		Content: cd,
 | 
			
		||||
		Tag:     "sardine.log.candle." + cl.Period,
 | 
			
		||||
	}
 | 
			
		||||
	err := wg.Process(core)
 | 
			
		||||
	err = wg.Process(core)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		fmt.Println("writeLog err:", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user