collector
This commit is contained in:
parent
f205c2e550
commit
c75555a71c
|
@ -63,7 +63,7 @@ func (c *Collector) stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collector) collect(id string) {
|
func (c *Collector) collect(id string) {
|
||||||
|
go func() {
|
||||||
conf := c.cm.GetSensorById(id)
|
conf := c.cm.GetSensorById(id)
|
||||||
log.Printf("COLLECT %s - [ID: %s] [Crawler : %s]", time.Now(), conf.Id, conf.Crawler.Name)
|
log.Printf("COLLECT %s - [ID: %s] [Crawler : %s]", time.Now(), conf.Id, conf.Crawler.Name)
|
||||||
conn, err := crm.GetInstance().GetClient(conf.Crawler.Container)
|
conn, err := crm.GetInstance().GetClient(conf.Crawler.Container)
|
||||||
|
@ -85,7 +85,7 @@ func (c *Collector) collect(id string) {
|
||||||
}
|
}
|
||||||
log.Println("collector get result : ", out)
|
log.Println("collector get result : ", out)
|
||||||
c.dataCh <- out
|
c.dataCh <- out
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collector) addSensor(sensorId string) error {
|
func (c *Collector) addSensor(sensorId string) error {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user