|
@@ -53,7 +53,7 @@ func (d *DeviceSceneService) Add(config string) error {
|
|
|
return errors.New("设备状态监控任务配置错误:判断条件不能为空")
|
|
return errors.New("设备状态监控任务配置错误:判断条件不能为空")
|
|
|
}
|
|
}
|
|
|
// 初始化Ticker和停止通道
|
|
// 初始化Ticker和停止通道
|
|
|
- c.ticker = time.NewTicker(20 * time.Second)
|
|
|
|
|
|
|
+ c.ticker = time.NewTicker(600 * time.Second)
|
|
|
c.stopChan = make(chan struct{})
|
|
c.stopChan = make(chan struct{})
|
|
|
|
|
|
|
|
// 启动监控协程
|
|
// 启动监控协程
|
|
@@ -72,7 +72,7 @@ func (d *DeviceSceneService) Update(config string) error {
|
|
|
_ = d.Stop(c.SceneId)
|
|
_ = d.Stop(c.SceneId)
|
|
|
|
|
|
|
|
// 初始化Ticker和停止通道
|
|
// 初始化Ticker和停止通道
|
|
|
- c.ticker = time.NewTicker(time.Duration(c.Interval) * time.Minute)
|
|
|
|
|
|
|
+ c.ticker = time.NewTicker(600 * time.Second)
|
|
|
c.stopChan = make(chan struct{})
|
|
c.stopChan = make(chan struct{})
|
|
|
|
|
|
|
|
// 启动监控协程
|
|
// 启动监控协程
|