This commit is contained in:
geek 2018-07-09 20:06:29 +09:00
parent b1a8b49044
commit 1155d16b9d

View File

@ -120,12 +120,13 @@ func (s *CollectorService) collectTask(sensorConfig *ocmsc.SensorConfig) {
result, err := s.CrawlerService.Get(sensorConfig.SensorID.String())
if nil != err {
logging.Logger().Errorf("Cannot get data from crawler[%s] %v", sensorConfig.Crawler.MetaCrawlerKey, err)
return
m.Success = false
} else {
m.Success = true
m.Data = result
}
m.Data = result
m.EndDate = occu.NowPtr()
m.Success = true
if err := s.ProbeService.Send("MetricService.Send", m); nil != err {
logging.Logger().Errorf("Cannot send data from config id[%s] of crawler[%s] %v", sensorConfig.SensorID, sensorConfig.Crawler.MetaCrawlerKey, err)