Fix healthcheck setup (#15)

With respect to rbkmoney/erlang-health@3a80bb43
This commit is contained in:
Andrew Mayorov 2020-01-31 17:26:47 +03:00 committed by GitHub
parent ed619500b7
commit 815cd106f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -26,11 +26,11 @@
idle_timeout => infinity
}},
{shutdown_timeout, 7000},
{health_checkers, [
{erl_health, disk , ["/", 99] },
{erl_health, cg_memory, [99] },
{erl_health, service , [<<"sequences">>]}
]},
{health_checkers, #{
disk => {erl_health, disk , ["/", 99] },
memory => {erl_health, cg_memory, [99] },
service => {erl_health, service , [<<"sequences">>]}
}},
{services, #{
automaton => #{
url => "http://machinegun:8022/v1/automaton",

View File

@ -33,7 +33,7 @@ stop() ->
init([]) ->
{ok, Ip} = inet:parse_address(genlib_app:env(?MODULE, ip, "::")),
HealthCheckers = genlib_app:env(?MODULE, health_checkers, []),
HealthCheck = genlib_app:env(?MODULE, health_check, #{}),
ChildSpec = woody_server:child_spec(
?MODULE,
#{
@ -46,7 +46,7 @@ init([]) ->
get_handler_spec(sequences),
get_handler_spec(state_processor)
],
additional_routes => [erl_health_handle:get_route(HealthCheckers)],
additional_routes => [erl_health_handle:get_route(HealthCheck)],
shutdown_timeout => genlib_app:env(?MODULE, shutdown_timeout, 0)
}
),