mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Shutdown raters on inquirer exit
This commit is contained in:
@@ -42,6 +42,8 @@ func main() {
|
||||
rpc.Register(raterServer)
|
||||
rpc.HandleHTTP()
|
||||
|
||||
go StopSingnalHandler()
|
||||
|
||||
responder := new(Responder)
|
||||
srvr := rpc.NewServer()
|
||||
srvr.Register(responder)
|
||||
|
||||
@@ -27,6 +27,13 @@ func (s *Storage) Get(args string, reply *string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *Storage) Shutdown(args string, reply *string) (err error) {
|
||||
s.sg.Close()
|
||||
defer os.Exit(0)
|
||||
*reply = "Done!"
|
||||
return nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
getter, err := NewKyotoStorage("storage.kch")
|
||||
|
||||
Reference in New Issue
Block a user