ing
This commit is contained in:
parent
ebe9ac6fd2
commit
5ef5f62fcb
|
@ -126,13 +126,13 @@ func (s *SensorConfigService) UpdateConfig(tempFilePath string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete(s.sensorConfigs, sc.ConfigID)
|
delete(s.sensorConfigs, sc.SensorID.String())
|
||||||
//s.sensorConfigs[sc.ID.String()] = sc
|
s.sensorConfigs[sc.SensorID.String()] = sc
|
||||||
//s.sortSensorConfigPerContainer()
|
s.sortSensorConfigPerContainer()
|
||||||
//
|
|
||||||
//if err := s.ContainerService.Send(occp.ToContainerType(sc.Crawler.Container), "SensorConfigService.UpdateConfig", sc); nil != err {
|
if err := s.ContainerService.Send(occp.ToContainerType(sc.Crawler.MetaCrawlerContainerKey), "SensorConfigService.UpdateConfig", sc); nil != err {
|
||||||
// return err
|
return err
|
||||||
//}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -152,9 +152,9 @@ func (s *SensorConfigService) RemoveConfig(sensorConfigID string) error {
|
||||||
delete(s.sensorConfigs, sensorConfigID)
|
delete(s.sensorConfigs, sensorConfigID)
|
||||||
s.sortSensorConfigPerContainer()
|
s.sortSensorConfigPerContainer()
|
||||||
|
|
||||||
//if err := s.ContainerService.Send(occp.ToContainerType(sc.Crawler.Container), "SensorConfigService.RemoveConfig", sensorConfigID); nil != err {
|
if err := s.ContainerService.Send(occp.ToContainerType(sc.Crawler.MetaCrawlerContainerKey), "SensorConfigService.RemoveConfig", sensorConfigID); nil != err {
|
||||||
// return err
|
return err
|
||||||
//}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -283,8 +283,8 @@ func (s *SensorConfigService) sortSensorConfigPerContainer() {
|
||||||
s.sensorConfigsPerContainer = nil
|
s.sensorConfigsPerContainer = nil
|
||||||
s.sensorConfigsPerContainer = make(map[occp.ContainerType][]*ocmsc.SensorConfig)
|
s.sensorConfigsPerContainer = make(map[occp.ContainerType][]*ocmsc.SensorConfig)
|
||||||
|
|
||||||
//for _, sensorConfig := range s.sensorConfigs {
|
for _, sensorConfig := range s.sensorConfigs {
|
||||||
// containerType := occp.ToContainerType(sensorConfig.Crawler.Container)
|
containerType := occp.ToContainerType(sensorConfig.Crawler.MetaCrawlerContainerKey)
|
||||||
// s.sensorConfigsPerContainer[containerType] = append(s.sensorConfigsPerContainer[containerType], sensorConfig)
|
s.sensorConfigsPerContainer[containerType] = append(s.sensorConfigsPerContainer[containerType], sensorConfig)
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user