From fd4bdf35518ecb670f13573628e9c10ce8ce4429 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 4 May 2018 20:57:16 +0900 Subject: [PATCH] ing --- service/CollectorService.go | 1 + 1 file changed, 1 insertion(+) diff --git a/service/CollectorService.go b/service/CollectorService.go index 64fd7f5..c9e7baa 100644 --- a/service/CollectorService.go +++ b/service/CollectorService.go @@ -89,6 +89,7 @@ func (s *CollectorService) RemoveSensorConfigs(sensorConfigs []*ocmsc.SensorConf } func (s *CollectorService) addSchedule(interval int64, sensorConfig *ocmsc.SensorConfig) { + s.removeSchedule(sensorConfig.ConfigID) scheduleID, err := s.scheduler.RunEvery(time.Duration(interval)*time.Second, s.collectTask, sensorConfig) if nil != err { logging.Logger().Errorf("Cannot add schedule for config[%s] %v", sensorConfig.ConfigID, err)