@@ -120,34 +120,6 @@ func (c *customPluginMonitor) Stop() {
120
120
c .tomb .Stop ()
121
121
}
122
122
123
- /*
124
- // monitorLoop is the main loop of customPluginMonitor.
125
- func (c *customPluginMonitor) monitorLoop() {
126
- c.initializeStatus()
127
-
128
- resultChan := c.plugin.GetResultChan()
129
-
130
- for {
131
- select {
132
- case result, ok := <-resultChan:
133
- if !ok {
134
- glog.Errorf("Result channel closed: %s", c.configPath)
135
- return
136
- }
137
- glog.V(3).Infof("Receive new plugin result for %s: %+v", c.configPath, result)
138
- status := c.generateStatus(result)
139
- glog.V(3).Infof("New status generated: %+v", status)
140
- c.statusChan <- status
141
- case <-c.tomb.Stopping():
142
- c.plugin.Stop()
143
- glog.Infof("Custom plugin monitor stopped: %s", c.configPath)
144
- c.tomb.Done()
145
- return
146
- }
147
- }
148
- }
149
- */
150
-
151
123
// monitorLoop is the main loop of customPluginMonitor.
152
124
func (c * customPluginMonitor ) monitorLoop () {
153
125
c .initializeStatus ()
@@ -170,12 +142,6 @@ func (c *customPluginMonitor) monitorLoop() {
170
142
171
143
// gather results for single rule interval loop
172
144
intervalResults = append (intervalResults , result )
173
-
174
- //glog.V(3).Infof("Receive new plugin result for %s: %+v", c.configPath, result)
175
- //status := c.generateStatus(result)
176
- //glog.V(3).Infof("New status generated: %+v", status)
177
- //c.statusChan <- status
178
-
179
145
case _ , ok := <- intervalEndChan :
180
146
if ! ok {
181
147
glog .Errorf ("Interval End Channel closed: %s" , c .configPath )
@@ -189,7 +155,6 @@ func (c *customPluginMonitor) monitorLoop() {
189
155
190
156
glog .V (3 ).Info ("Resetting interval" )
191
157
intervalResults = []cpmtypes.Result {}
192
-
193
158
case <- c .tomb .Stopping ():
194
159
c .plugin .Stop ()
195
160
glog .Infof ("Custom plugin monitor stopped: %s" , c .configPath )
0 commit comments