ing
This commit is contained in:
parent
657796d456
commit
35835eb736
|
@ -49,10 +49,6 @@ func (sh *ServerHandlers) Init(serverCTX server.ServerContext) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := oocu.ExecuteStarters(sh.services, sh.servicesToStartAndStop, false); nil != err {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -72,6 +68,10 @@ func (sh *ServerHandlers) Listen(serverCTX server.ServerContext) (net.Listener,
|
|||
func (sh *ServerHandlers) OnStart(serverCTX server.ServerContext) {
|
||||
sh.ServerHandlers.OnStart(serverCTX)
|
||||
|
||||
if err := oocu.ExecuteStarters(sh.services, sh.servicesToStartAndStop, false); nil != err {
|
||||
logging.Logger().Panicf("Cannot start services %v", err)
|
||||
}
|
||||
|
||||
if _, err := os.Stat(sh.pidPathABS); os.IsExist(err) {
|
||||
if err := os.Remove(sh.pidPathABS); nil != err {
|
||||
logging.Logger().Errorf("Container: Removing pid file has been failed [%v]", err)
|
||||
|
@ -89,13 +89,14 @@ func (sh *ServerHandlers) OnStop(serverCTX server.ServerContext) {
|
|||
}
|
||||
}
|
||||
|
||||
if err := oocu.ExecuteStoppers(sh.services, sh.servicesToStartAndStop, true); nil != err {
|
||||
logging.Logger().Error(err)
|
||||
}
|
||||
|
||||
sh.ServerHandlers.OnStop(serverCTX)
|
||||
}
|
||||
|
||||
func (sh *ServerHandlers) Destroy(serverCTX server.ServerContext) {
|
||||
if err := oocu.ExecuteStoppers(sh.services, sh.servicesToStartAndStop, true); nil != err {
|
||||
logging.Logger().Error(err)
|
||||
}
|
||||
|
||||
sh.ServerHandlers.Destroy(serverCTX)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user