long poller
This commit is contained in:
parent
fbd63c533e
commit
37b37b5870
|
@ -9,12 +9,12 @@ func handleConfigLoaded() {
|
|||
ch := make(chan interface{}, 0)
|
||||
observer.Add(messages.CFG_LOADED, ch)
|
||||
startPoller(ch)
|
||||
observer.Remove(messages.CFG_LOADED, ch)
|
||||
//observer.Remove(messages.CFG_LOADED, ch)
|
||||
}
|
||||
|
||||
func (p *Poller) handleAgentStop() {
|
||||
ch := make(chan interface{}, 0)
|
||||
observer.Add(messages.AGT_STOPPED, ch)
|
||||
p.Stop()
|
||||
observer.Remove(messages.AGT_STOPPED, ch)
|
||||
//observer.Remove(messages.AGT_STOPPED, ch)
|
||||
}
|
||||
|
|
|
@ -15,6 +15,6 @@ func TestPolling(t *testing.T) {
|
|||
func TestTotal(t *testing.T) {
|
||||
time.Sleep(time.Second * 5)
|
||||
|
||||
observer.Notify(messages.CONFIGMANAGER_LOADED, "") //CONFIG LOCATION
|
||||
observer.Notify(messages.CFG_LOADED, "") //CONFIG LOCATION
|
||||
time.Sleep(time.Second * 100)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user