Commit e3d57fc8 authored by Kamil Kisiel's avatar Kamil Kisiel

Use the result of SendMetrics

parent 37cdc384
......@@ -232,7 +232,9 @@ func metricAggregator(graphiteAddr string, metricChan chan Metric, consoleChan c
}
stats.LastMessage = time.Now()
case <-flushTimer.C: // Time to flush to graphite
go graphite.SendMetrics(aggregateMetrics(counters, gauges, timers, flushInterval))
go func() {
flushChan <- graphite.SendMetrics(aggregateMetrics(counters, gauges, timers, flushInterval))
}()
// Reset counters
new_counters := make(MetricMap)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment