AGENT_STARTING change
This commit is contained in:
parent
57646371c0
commit
ac6eb35e35
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
func agentStartHandler() {
|
||||
agentStart := make(chan interface{}, 0)
|
||||
observer.Add(messages.AGENT_STARTED, agentStart)
|
||||
observer.Add(messages.AGT_STARTING, agentStart)
|
||||
go func() {
|
||||
data := <-agentStart
|
||||
path := data.(string)
|
||||
|
@ -19,17 +19,17 @@ func agentStartHandler() {
|
|||
// error process
|
||||
}
|
||||
|
||||
observer.Remove(messages.AGENT_STARTED, agentStart)
|
||||
observer.Remove(messages.AGT_STARTING, agentStart)
|
||||
observer.Notify(messages.CFG_LOADED, _configManager)
|
||||
}()
|
||||
}
|
||||
|
||||
func agentEndHandler() {
|
||||
agentEnd := make(chan interface{}, 0)
|
||||
observer.Add(messages.AGENT_WILL_STOPPED, agentEnd)
|
||||
observer.Add(messages.AGT_WILL_STOPPED, agentEnd)
|
||||
go func() {
|
||||
_ = <-agentEnd
|
||||
observer.Remove(messages.AGENT_WILL_STOPPED, agentEnd)
|
||||
observer.Remove(messages.AGT_WILL_STOPPED, agentEnd)
|
||||
observer.Remove(messages.TASK_SENSOR_ADD,_configManager.addCh)
|
||||
observer.Remove(messages.TASK_SENSOR_REMOVE,_configManager.removeCh)
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue
Block a user