diff --git a/consumers/consumerSinoGnssMySQL.go b/consumers/consumerSinoGnssMySQL.go index eecc081..2c4ff97 100644 --- a/consumers/consumerSinoGnssMySQL.go +++ b/consumers/consumerSinoGnssMySQL.go @@ -20,7 +20,7 @@ type consumerSinoGnssMySQL struct { Info SinoGnssMySQL.ConfigFile InDB *dbOperate.DBHelper outMqtt *dbOperate.MqttHelper - monitor *monitors.CommonMonitorMonitor + monitor *monitors.CommonMonitor } func (the *consumerSinoGnssMySQL) LoadConfigJson(cfgStr string) { @@ -47,7 +47,7 @@ func (the *consumerSinoGnssMySQL) InputInitial() error { the.InDB = dbOperate.NewDBHelper( the.Info.IoConfig.In.Db.Type, the.Info.IoConfig.In.Db.ConnStr) - the.monitor = &monitors.CommonMonitorMonitor{ + the.monitor = &monitors.CommonMonitor{ MonitorHelper: &monitors.MonitorHelper{CronStr: the.Info.IoConfig.In.CronStr}, } the.monitor.Start() diff --git a/monitors/commonMonitor.go b/monitors/commonMonitor.go index dd04e10..c702665 100644 --- a/monitors/commonMonitor.go +++ b/monitors/commonMonitor.go @@ -1,14 +1,14 @@ package monitors -type CommonMonitorMonitor struct { +type CommonMonitor struct { *MonitorHelper } -func (the *CommonMonitorMonitor) RegisterFun(fun func()) { +func (the *CommonMonitor) RegisterFun(fun func()) { the.registerFun(fun) } -func (the *CommonMonitorMonitor) Start() { +func (the *CommonMonitor) Start() { the.initial() the.monitorStart() }