diff --git a/core/candle.go b/core/candle.go index 4ccc721..2aae94c 100644 --- a/core/candle.go +++ b/core/candle.go @@ -284,14 +284,14 @@ func (core *Core) SaveUniKey(period string, keyName string, extt time.Duration, did := cl.InstId + cl.Period + cl.Data[0].(string) cl.Id = hashString(did) cl.ToStruct(core) - // cd, _ := json.Marshal(cl) - // wg := WriteLog{ - // Content: cd, - // Tag: "sardine.log.candle." + cl.Period, - // Id: hashString(did), - // } + cd, _ := json.Marshal(cl) + wg := WriteLog{ + Content: cd, + Tag: "sardine.log.candle." + cl.Period, + Id: hashString(did), + } // go func() { - // core.WriteLogChan <- &wg + core.WriteLogChan <- &wg // }() // err = wg.Process(core) diff --git a/core/core.go b/core/core.go index fe69c3c..157397e 100644 --- a/core/core.go +++ b/core/core.go @@ -112,6 +112,7 @@ func (core *Core) Init() { cli, err := core.GetRedisCli() core.RedisCli = cli core.RestQueueChan = make(chan *RestQueue) + core.WriteLogChan = make(chan *WriteLog) core.OrderChan = make(chan *private.Order) if err != nil { fmt.Println("init redis client err: ", err) diff --git a/tunas b/tunas index dbf83be..25abffa 100755 Binary files a/tunas and b/tunas differ