diff --git a/apps/hellgate/src/hellgate.erl b/apps/hellgate/src/hellgate.erl index 367926a7..275e5ba8 100644 --- a/apps/hellgate/src/hellgate.erl +++ b/apps/hellgate/src/hellgate.erl @@ -59,7 +59,9 @@ init([]) -> get_api_child_spec(MachineHandlers, Opts) -> {ok, Ip} = inet:parse_address(genlib_app:env(?MODULE, ip, "::")), - HealthRoutes = construct_health_routes(genlib_app:env(?MODULE, health_check, #{})), + HealthRoutes = + construct_health_routes(liveness, genlib_app:env(?MODULE, health_check_liveness, #{})) ++ + construct_health_routes(readiness, genlib_app:env(?MODULE, health_check_readiness, #{})), EventHandlerOpts = genlib_app:env(?MODULE, scoper_event_handler_options, #{}), PrometeusRoute = get_prometheus_route(), woody_server:child_spec( @@ -81,8 +83,10 @@ get_api_child_spec(MachineHandlers, Opts) -> } ). -construct_health_routes(Check) -> - [erl_health_handle:get_route(enable_health_logging(Check))]. +construct_health_routes(liveness, Check) -> + [erl_health_handle:get_liveness_route(enable_health_logging(Check))]; +construct_health_routes(readiness, Check) -> + [erl_health_handle:get_readiness_route(enable_health_logging(Check))]. enable_health_logging(Check) -> EvHandler = {erl_health_event_handler, []}, diff --git a/config/sys.config b/config/sys.config index 65995fbd..67cd24ed 100644 --- a/config/sys.config +++ b/config/sys.config @@ -68,7 +68,7 @@ service => {erl_health, service, [<<"hellgate">>]} }}, {health_check_readiness, #{ - dmt_client => {dmt_client, health_check, [<<"hellgate">>]}, + dmt_client => {dmt_client, health_check, []}, progressor => {progressor, health_check, [ %% list of progressors namespaces for tests