From a3e22db3caebf9ff1338f455ca8fb1391d2200ea Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Thu, 26 Sep 2019 13:38:43 +0800 Subject: [PATCH] feat(service): add healthcheck for arbitary service --- gnes/cli/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnes/cli/parser.py b/gnes/cli/parser.py index 690689c5..634f531a 100644 --- a/gnes/cli/parser.py +++ b/gnes/cli/parser.py @@ -252,9 +252,9 @@ def set_healthcheck_parser(parser=None): help='number of health checks retried before exit') # we cant wait for health check signal forever, thus set to 5 seconds parser.set_defaults(timeout=5) - ctrl_port = int(os.environ.get('GNES_CONTROL_PORT')) + ctrl_port = os.environ.get('GNES_CONTROL_PORT') if ctrl_port: - parser.set_defaults(port_out=ctrl_port) + parser.set_defaults(port_out=int(ctrl_port)) return parser