Added endMQM options and tests
This commit is contained in:
committed by
Stephen D Marshall
parent
176a023a99
commit
88bcaaecc3
@@ -173,17 +173,18 @@ func configureQueueManager() error {
|
||||
|
||||
func stopQueueManager(name string) error {
|
||||
log.Println("Stopping queue manager")
|
||||
qmGracePeriod := os.Getenv("QMGRACEPERIOD")
|
||||
isStandby, err := ready.IsRunningAsStandbyQM(name)
|
||||
if err != nil {
|
||||
log.Printf("Error getting status for queue manager %v: %v", name, err.Error())
|
||||
return err
|
||||
}
|
||||
args := []string{"-w", "-r", name}
|
||||
args := []string{"-w", "-r", "-tp", qmGracePeriod, name}
|
||||
if os.Getenv("MQ_MULTI_INSTANCE") == "true" {
|
||||
if isStandby {
|
||||
args = []string{"-x", name}
|
||||
} else {
|
||||
args = []string{"-s", "-w", "-r", name}
|
||||
args = []string{"-s", "-w", "-r", "-tp", qmGracePeriod, name}
|
||||
}
|
||||
}
|
||||
out, rc, err := command.Run("endmqm", args...)
|
||||
|
||||
Reference in New Issue
Block a user