Add check for the wait

pull/710/head
Pablo Garcia Alvarez 1 month ago
parent 56a9454730
commit c168e1e9fc
No known key found for this signature in database
GPG Key ID: CCCBDF97347BA11A

@ -91,8 +91,10 @@ func (mc *MetricsCollector) Run() error {
//go mc.Collect(&wg, device.WWN, device.DeviceName, device.DeviceType) //go mc.Collect(&wg, device.WWN, device.DeviceName, device.DeviceType)
mc.Collect(device.WWN, device.DeviceName, device.DeviceType) mc.Collect(device.WWN, device.DeviceName, device.DeviceType)
if mc.config.GetInt("commands.metrics_smartctl_wait") > 0 {
time.Sleep(time.Duration(mc.config.GetInt("commands.metrics_smartctl_wait")) * time.Millisecond) time.Sleep(time.Duration(mc.config.GetInt("commands.metrics_smartctl_wait")) * time.Millisecond)
} }
}
//mc.logger.Infoln("Main: Waiting for workers to finish") //mc.logger.Infoln("Main: Waiting for workers to finish")
//wg.Wait() //wg.Wait()

Loading…
Cancel
Save