collector

This commit is contained in:
insanity@loafle.com 2017-05-18 13:48:22 +09:00
parent fd7ea8daf6
commit 5e5bef7c47

View File

@ -75,9 +75,11 @@ func (c *Collector) collect(id string) {
in.Id = id
in.Name = grpc.Crawlers(grpc.Crawlers_value[conf.Crawler.Name])
out, err := dc.Get(context.Background(), in)
if err != nil {
log.Printf("Cannot collect [ID: %s] [Crawler : %s] - [Err : %s]\n", conf.Id, conf.Crawler.Name, err)
log.Printf("Cannot collect [ID: %s] [Crawler : %s] - [Err : %s]\n", conf.Id, conf.Crawler.Name, err.Error())
return
}
log.Printf("COLLECTED. [ID: %s] [Crawler : %s] [Result : %s]\n", conf.Id, conf.Crawler.Name, out.GetData())
c.dataCh <- out