MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / execConfigChangedTask

Method execConfigChangedTask

internal/nodes/node_tasks.go:131–140  ·  view source on GitHub ↗

更新节点配置变更

(task *pb.NodeTask)

Source from the content-addressed store, hash-verified

129
130// 更新节点配置变更
131func (this *Node) execConfigChangedTask(task *pb.NodeTask) error {
132 if task.ServerId > 0 {
133 return this.syncServerConfig(task.ServerId)
134 }
135 if !task.IsPrimary {
136 // 我们等等主节点配置准备完毕
137 time.Sleep(2 * time.Second)
138 }
139 return this.syncConfig(task.Version)
140}
141
142// 节点程序版本号变更
143func (this *Node) execNodeVersionChangedTask() error {

Callers 1

execTaskMethod · 0.95

Calls 2

syncServerConfigMethod · 0.95
syncConfigMethod · 0.95

Tested by

no test coverage detected