Update readiness check

This commit is contained in:
Arthur Barr
2018-02-14 11:18:20 +00:00
parent 54a5052631
commit 911f9db2fd
4 changed files with 152 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
© Copyright IBM Corporation 2017
© Copyright IBM Corporation 2017, 2018
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,9 +20,17 @@ package main
import (
"net"
"os"
"github.com/ibm-messaging/mq-container/internal/ready"
)
func main() {
// Check if runmqserver has indicated that it's finished configuration
r, err := ready.Check()
if !r || err != nil {
os.Exit(1)
}
// Check if the queue manager has a running listener
conn, err := net.Dial("tcp", "127.0.0.1:1414")
if err != nil {
os.Exit(1)