mirror of
https://github.com/valitydev/sequences.git
synced 2024-11-06 02:05:20 +00:00
Fix healthcheck setup (#15)
With respect to rbkmoney/erlang-health@3a80bb43
This commit is contained in:
parent
ed619500b7
commit
815cd106f4
@ -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",
|
||||
|
@ -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)
|
||||
}
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user