ing
This commit is contained in:
parent
794b2c9ba5
commit
9dfd718c36
@ -12,6 +12,8 @@ import (
|
|||||||
logging "git.loafle.net/commons/logging-go"
|
logging "git.loafle.net/commons/logging-go"
|
||||||
cuts "git.loafle.net/commons/util-go/time/scheduler"
|
cuts "git.loafle.net/commons/util-go/time/scheduler"
|
||||||
cutss "git.loafle.net/commons/util-go/time/scheduler/storage"
|
cutss "git.loafle.net/commons/util-go/time/scheduler/storage"
|
||||||
|
occu "git.loafle.net/overflow/commons-go/core/util"
|
||||||
|
ocmd "git.loafle.net/overflow/commons-go/model/data"
|
||||||
ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
|
ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
|
||||||
ocsp "git.loafle.net/overflow/commons-go/service/probe"
|
ocsp "git.loafle.net/overflow/commons-go/service/probe"
|
||||||
|
|
||||||
@ -116,7 +118,13 @@ func (s *CollectorService) collectTask(sensorConfig *ocmsc.SensorConfig) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.ProbeService.Send("DataService.Metric", sensorConfig.ConfigID, result); nil != err {
|
m := &ocmd.Metric{
|
||||||
|
SensorConfigID: sensorConfig.ConfigID,
|
||||||
|
Data: result,
|
||||||
|
CollectDate: occu.NowPtr(),
|
||||||
|
}
|
||||||
|
|
||||||
|
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.ConfigID, sensorConfig.Crawler.Name, err)
|
logging.Logger().Errorf("Cannot send data from config id[%s] of crawler[%s] %v", sensorConfig.ConfigID, sensorConfig.Crawler.Name, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user