Bug fixes in input and onramp. Hot config reload on signals. Added example utility scripts for signals.
This commit is contained in:
@@ -211,9 +211,19 @@ func (a *Aggregator) serve(host string, port int) {
|
||||
var response interface{}
|
||||
a.mu.RLock()
|
||||
if cmd == "live" {
|
||||
// Deep copy the cache
|
||||
cacheCopy := make(map[string]map[int64]*Candle)
|
||||
for tf, candles := range a.cache {
|
||||
cacheCopy[tf] = make(map[int64]*Candle)
|
||||
for ts, candle := range candles {
|
||||
// Copy the candle struct
|
||||
candleCopy := *candle
|
||||
cacheCopy[tf][ts] = &candleCopy
|
||||
}
|
||||
}
|
||||
response = map[string]interface{}{
|
||||
"type": "live_candles",
|
||||
"data": a.cache,
|
||||
"data": cacheCopy,
|
||||
}
|
||||
} else {
|
||||
response = map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user