nil 오류 수정
This commit is contained in:
parent
abe19350f5
commit
fc407c6be3
|
@ -46,7 +46,6 @@ func (m *influxMetric) StartLogging() {
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
influxLogger.Errorf("ERR:%s", debug.Stack())
|
|
||||||
m.handler.NotifyError(err.(error))
|
m.handler.NotifyError(err.(error))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
@ -83,7 +82,7 @@ func (m *influxMetric) StartLogging() {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
ticker := time.Tick(time.Second)
|
ticker := time.Tick(time.Second)
|
||||||
pointList := make([]*client.Point, 0)
|
pointList := make([]*client.Point, 0, 0)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
pointList = pointList[:cap(pointList)]
|
pointList = pointList[:cap(pointList)]
|
||||||
|
@ -113,7 +112,7 @@ func (m *influxMetric) StartLogging() {
|
||||||
if err := influxDbConn.Write(batchPoint); err != nil {
|
if err := influxDbConn.Write(batchPoint); err != nil {
|
||||||
influxLogger.Warn(err)
|
influxLogger.Warn(err)
|
||||||
}
|
}
|
||||||
pointList = pointList[:0]
|
pointList = make([]*client.Point, 0, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue