event stop add
This commit is contained in:
parent
b55a51bf07
commit
eab0875306
|
@ -43,7 +43,7 @@ func init() {
|
||||||
ch := make(chan interface{}, 0)
|
ch := make(chan interface{}, 0)
|
||||||
ch1 := make(chan interface{}, 0)
|
ch1 := make(chan interface{}, 0)
|
||||||
observer.Add(messages.CFG_LOADED, ch)
|
observer.Add(messages.CFG_LOADED, ch)
|
||||||
observer.Add(messages.SCF_STOPPED,ch1)
|
observer.Add(messages.SCF_STOPPED, ch1)
|
||||||
handleInit(ch, ch1)
|
handleInit(ch, ch1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,9 +58,9 @@ func handleInit(ch chan interface{}, ch1 chan interface{}) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
data := <- ch1
|
data := <-ch1
|
||||||
observer.Notify(messages.QUEUE_DATA, data)
|
observer.Notify(messages.QUEUE_EVENT, data)
|
||||||
time.Sleep(2*time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
es.Stop()
|
es.Stop()
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user