Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsqadmin: display errors #421

Merged
merged 12 commits into from
Sep 17, 2015
8 changes: 4 additions & 4 deletions apps/nsq_stat/nsq_stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ func statLoop(interval time.Duration, topic string, channel string,
ci := clusterinfo.New(nil, http_api.NewClient(nil))
var o *clusterinfo.ChannelStats
for i := 0; !countNum.isSet || countNum.value >= i; i++ {
var producerList clusterinfo.ProducerList
var producers clusterinfo.Producers
var err error

if len(lookupdHTTPAddrs) != 0 {
producerList, err = ci.GetLookupdTopicProducers(topic, lookupdHTTPAddrs)
producers, err = ci.GetLookupdTopicProducers(topic, lookupdHTTPAddrs)
} else {
producerList, err = ci.GetNSQDTopicProducers(topic, nsqdHTTPAddrs)
producers, err = ci.GetNSQDTopicProducers(topic, nsqdHTTPAddrs)
}
if err != nil {
log.Fatalf("ERROR: failed to get topic producers - %s", err)
}

_, allChannelStats, err := ci.GetNSQDStats(producerList, topic)
_, allChannelStats, err := ci.GetNSQDStats(producers, topic)
if err != nil {
log.Fatalf("ERROR: failed to get nsqd stats - %s", err)
}
Expand Down
Loading