summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormicplus <ain01a@outlook.com>2024-04-07 09:33:40 +0800
committermicplus <ain01a@outlook.com>2024-04-07 14:17:37 +0800
commit57401e7e513a2e6e2b1cb661bd1c3fc4ad8b9da8 (patch)
tree8bc63c1abd11152d7c370a26226770b7526c653d
parentfeat: edged compatibility (diff)
downloadkubeedge-57401e7e513a2e6e2b1cb661bd1c3fc4ad8b9da8.tar.gz
chore: modify comments
Signed-off-by: micplus <ain01a@outlook.com>
-rw-r--r--staging/src/github.com/kubeedge/beehive/pkg/core/core.go3
-rw-r--r--staging/src/github.com/kubeedge/beehive/pkg/core/module.go5
2 files changed, 2 insertions, 6 deletions
diff --git a/staging/src/github.com/kubeedge/beehive/pkg/core/core.go b/staging/src/github.com/kubeedge/beehive/pkg/core/core.go
index 3f6c9051c..43fdc9838 100644
--- a/staging/src/github.com/kubeedge/beehive/pkg/core/core.go
+++ b/staging/src/github.com/kubeedge/beehive/pkg/core/core.go
@@ -92,7 +92,7 @@ func moduleKeeper(name string, moduleInfo *ModuleInfo, m common.ModuleInfo) {
}
// localModuleKeeper starts and tries to keep module running when module exited.
-// Call EnableModuleRestart() to enable auto-restarting feature.
+// Call EnableModuleRestart() to enable auto-restarting feature in alpha version.
func localModuleKeeper(m *ModuleInfo) {
if !moduleRestartEnabled {
m.module.Start()
@@ -102,6 +102,7 @@ func localModuleKeeper(m *ModuleInfo) {
ctx := beehiveContext.GetContext()
backoffDuration := time.Second
+ // do if module exits
afterFunc := func() {
if r := recover(); r != nil {
klog.Errorf("module %s panicking: %v", m.module.Name(), r)
diff --git a/staging/src/github.com/kubeedge/beehive/pkg/core/module.go b/staging/src/github.com/kubeedge/beehive/pkg/core/module.go
index caa6cf26b..618b099ca 100644
--- a/staging/src/github.com/kubeedge/beehive/pkg/core/module.go
+++ b/staging/src/github.com/kubeedge/beehive/pkg/core/module.go
@@ -91,11 +91,6 @@ func EnableModuleRestart() {
moduleRestartEnabled = true
}
-// DisableModuleRestart enable new feature for auto restarting modules
-func DisableModuleRestart() {
- moduleRestartEnabled = false
-}
-
// IsModuleRestartEnabled checks whether auto-restart feature is enabled.
func IsModuleRestartEnabled() bool {
return moduleRestartEnabled