Update ready check for native-HA

This commit is contained in:
Stephen Marshall
2020-12-07 20:04:59 +00:00
parent adf15b7bd3
commit 68fe4a1dc1
2 changed files with 12 additions and 2 deletions

View File

@@ -76,6 +76,11 @@ func IsRunningAsStandbyQM(name string) (bool, error) {
return isRunningQM(name, "(RUNNING AS STANDBY)")
}
// IsRunningAsReplicaQM returns true if the queue manager is running in replica mode
func IsRunningAsReplicaQM(name string) (bool, error) {
return isRunningQM(name, "(REPLICA)")
}
func isRunningQM(name string, status string) (bool, error) {
out, _, err := command.Run("dspmq", "-n", "-m", name)
if err != nil {