summaryrefslogtreecommitdiff
path: root/mappers
diff options
context:
space:
mode:
authorsailorvii <challengingway@hotmail.com>2020-07-31 10:17:40 +0800
committersailorvii <challengingway@hotmail.com>2020-07-31 10:17:40 +0800
commitdcb77bfbf2704456525cc5c179353f53e537c91f (patch)
tree9fd3336ee9f61a556083ed52066f608c713d0d6d /mappers
parentFix issue 1824 (diff)
downloadkubeedge-dcb77bfbf2704456525cc5c179353f53e537c91f.tar.gz
Move the setting out of the rotation.
Diffstat (limited to 'mappers')
-rw-r--r--mappers/bluetooth_mapper/scheduler/scheduler.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/mappers/bluetooth_mapper/scheduler/scheduler.go b/mappers/bluetooth_mapper/scheduler/scheduler.go
index 7fd73d47a..0ec9cf79d 100644
--- a/mappers/bluetooth_mapper/scheduler/scheduler.go
+++ b/mappers/bluetooth_mapper/scheduler/scheduler.go
@@ -24,8 +24,8 @@ import (
"k8s.io/klog"
- "github.com/kubeedge/kubeedge/mappers/bluetooth_mapper/action_manager"
- "github.com/kubeedge/kubeedge/mappers/bluetooth_mapper/data_converter"
+ actionmanager "github.com/kubeedge/kubeedge/mappers/bluetooth_mapper/action_manager"
+ dataconverter "github.com/kubeedge/kubeedge/mappers/bluetooth_mapper/data_converter"
"github.com/kubeedge/kubeedge/mappers/bluetooth_mapper/helper"
)
@@ -78,6 +78,9 @@ func (schedule *Schedule) ExecuteSchedule(actionManager []actionmanager.Action,
// performScheduleOperation is responsible for performing the operations associated with the schedule
func (schedule *Schedule) performScheduleOperation(actionManager []actionmanager.Action, dataConverter dataconverter.DataRead, deviceID string) {
var scheduleResult ScheduleResult
+ if schedule.Interval == 0 {
+ schedule.Interval = defaultEventFrequency
+ }
for _, actionName := range schedule.Actions {
actionExists := false
for _, action := range actionManager {
@@ -91,9 +94,6 @@ func (schedule *Schedule) performScheduleOperation(actionManager []actionmanager
publishScheduleResult(scheduleResult, deviceID)
}
}
- if schedule.Interval == 0 {
- schedule.Interval = defaultEventFrequency
- }
if !actionExists {
klog.Errorf("Action %s does not exist.", actionName)
continue