event stop add

This commit is contained in:
geek 2017-05-11 18:56:57 +09:00
parent b55a51bf07
commit eab0875306

View File

@ -43,7 +43,7 @@ func init() {
ch := make(chan interface{}, 0)
ch1 := make(chan interface{}, 0)
observer.Add(messages.CFG_LOADED, ch)
observer.Add(messages.SCF_STOPPED,ch1)
observer.Add(messages.SCF_STOPPED, ch1)
handleInit(ch, ch1)
}
@ -58,9 +58,9 @@ func handleInit(ch chan interface{}, ch1 chan interface{}) {
}()
go func() {
data := <- ch1
observer.Notify(messages.QUEUE_DATA, data)
time.Sleep(2*time.Second)
data := <-ch1
observer.Notify(messages.QUEUE_EVENT, data)
time.Sleep(2 * time.Second)
es.Stop()
}()
}