mirror of
https://github.com/valitydev/hellgate.git
synced 2024-11-06 02:45:20 +00:00
XP-927: bump progressor from master
This commit is contained in:
parent
556f23e570
commit
a133b42241
@ -307,7 +307,7 @@ start_app(progressor = AppName) ->
|
|||||||
{call_wait_timeout, 20},
|
{call_wait_timeout, 20},
|
||||||
{defaults, #{
|
{defaults, #{
|
||||||
storage => #{
|
storage => #{
|
||||||
client => prg_pg_backend2,
|
client => prg_pg_backend,
|
||||||
options => #{
|
options => #{
|
||||||
pool => default_pool,
|
pool => default_pool,
|
||||||
front_pool => default_front_pool,
|
front_pool => default_front_pool,
|
||||||
|
@ -30,7 +30,9 @@ call_automaton('Start', {NS, ID, Args}) ->
|
|||||||
{ok, ok} = Result ->
|
{ok, ok} = Result ->
|
||||||
Result;
|
Result;
|
||||||
{error, <<"process already exists">>} ->
|
{error, <<"process already exists">>} ->
|
||||||
{error, exists}
|
{error, exists};
|
||||||
|
{error, {exception, _, _} = Exception} ->
|
||||||
|
handle_exception(Exception)
|
||||||
end;
|
end;
|
||||||
call_automaton('Call', {MachineDesc, Args}) ->
|
call_automaton('Call', {MachineDesc, Args}) ->
|
||||||
#mg_stateproc_MachineDescriptor{
|
#mg_stateproc_MachineDescriptor{
|
||||||
@ -49,7 +51,9 @@ call_automaton('Call', {MachineDesc, Args}) ->
|
|||||||
{error, <<"process not found">>} ->
|
{error, <<"process not found">>} ->
|
||||||
{error, notfound};
|
{error, notfound};
|
||||||
{error, <<"process is error">>} ->
|
{error, <<"process is error">>} ->
|
||||||
{error, failed}
|
{error, failed};
|
||||||
|
{error, {exception, _, _} = Exception} ->
|
||||||
|
handle_exception(Exception)
|
||||||
end;
|
end;
|
||||||
call_automaton('GetMachine', {MachineDesc}) ->
|
call_automaton('GetMachine', {MachineDesc}) ->
|
||||||
#mg_stateproc_MachineDescriptor{
|
#mg_stateproc_MachineDescriptor{
|
||||||
@ -67,7 +71,9 @@ call_automaton('GetMachine', {MachineDesc}) ->
|
|||||||
Machine = marshal(process, Process#{ns => NS}),
|
Machine = marshal(process, Process#{ns => NS}),
|
||||||
{ok, Machine#mg_stateproc_Machine{history_range = Range}};
|
{ok, Machine#mg_stateproc_Machine{history_range = Range}};
|
||||||
{error, <<"process not found">>} ->
|
{error, <<"process not found">>} ->
|
||||||
{error, notfound}
|
{error, notfound};
|
||||||
|
{error, {exception, _, _} = Exception} ->
|
||||||
|
handle_exception(Exception)
|
||||||
end;
|
end;
|
||||||
call_automaton('Repair', {MachineDesc, Args}) ->
|
call_automaton('Repair', {MachineDesc, Args}) ->
|
||||||
#mg_stateproc_MachineDescriptor{
|
#mg_stateproc_MachineDescriptor{
|
||||||
@ -88,7 +94,9 @@ call_automaton('Repair', {MachineDesc, Args}) ->
|
|||||||
{error, <<"process is running">>} ->
|
{error, <<"process is running">>} ->
|
||||||
{error, working};
|
{error, working};
|
||||||
{error, <<"process is error">>} ->
|
{error, <<"process is error">>} ->
|
||||||
{error, failed}
|
{error, failed};
|
||||||
|
{error, {exception, _, _} = Exception} ->
|
||||||
|
handle_exception(Exception)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%-ifdef(TEST).
|
%-ifdef(TEST).
|
||||||
@ -173,6 +181,10 @@ handle_result(
|
|||||||
handle_result(_Unexpected, _LastEventId) ->
|
handle_result(_Unexpected, _LastEventId) ->
|
||||||
{error, <<"unexpected result">>}.
|
{error, <<"unexpected result">>}.
|
||||||
|
|
||||||
|
-spec handle_exception(_) -> no_return().
|
||||||
|
handle_exception({exception, Class, Reason}) ->
|
||||||
|
erlang:raise(Class, Reason, []).
|
||||||
|
|
||||||
get_context() ->
|
get_context() ->
|
||||||
try hg_context:load() of
|
try hg_context:load() of
|
||||||
Ctx ->
|
Ctx ->
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
{fault_detector_proto, {git, "https://github.com/valitydev/fault-detector-proto.git", {branch, "master"}}},
|
{fault_detector_proto, {git, "https://github.com/valitydev/fault-detector-proto.git", {branch, "master"}}},
|
||||||
{limiter_proto, {git, "https://github.com/valitydev/limiter-proto.git", {branch, "master"}}},
|
{limiter_proto, {git, "https://github.com/valitydev/limiter-proto.git", {branch, "master"}}},
|
||||||
{herd, {git, "https://github.com/wgnet/herd.git", {tag, "1.3.4"}}},
|
{herd, {git, "https://github.com/wgnet/herd.git", {tag, "1.3.4"}}},
|
||||||
{progressor, {git, "https://github.com/valitydev/progressor.git", {branch, "epic/TD-927/progressor-prototype"}}},
|
{progressor, {git, "https://github.com/valitydev/progressor.git", {branch, "master"}}},
|
||||||
{prometheus, "4.8.1"},
|
{prometheus, "4.8.1"},
|
||||||
{prometheus_cowboy, "0.1.8"},
|
{prometheus_cowboy, "0.1.8"},
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
1},
|
1},
|
||||||
{<<"epg_connector">>,
|
{<<"epg_connector">>,
|
||||||
{git,"https://github.com/valitydev/epg_connector.git",
|
{git,"https://github.com/valitydev/epg_connector.git",
|
||||||
{ref,"a507052d66023e36dc75d85054db24d000c6ea71"}},
|
{ref,"c4e447b434d83d2d8615453fb5a008a7f493a5c6"}},
|
||||||
1},
|
1},
|
||||||
{<<"epgsql">>,
|
{<<"epgsql">>,
|
||||||
{git,"https://github.com/epgsql/epgsql.git",
|
{git,"https://github.com/epgsql/epgsql.git",
|
||||||
@ -107,7 +107,7 @@
|
|||||||
{<<"pooler">>,{pkg,<<"pooler">>,<<"1.5.3">>},3},
|
{<<"pooler">>,{pkg,<<"pooler">>,<<"1.5.3">>},3},
|
||||||
{<<"progressor">>,
|
{<<"progressor">>,
|
||||||
{git,"https://github.com/valitydev/progressor.git",
|
{git,"https://github.com/valitydev/progressor.git",
|
||||||
{ref,"6f76a423d5a260082009c883505dc91886f0e7d4"}},
|
{ref,"79f16f9cc3eab26d4e6cdffcff28a066d0b85088"}},
|
||||||
0},
|
0},
|
||||||
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"4.8.1">>},0},
|
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"4.8.1">>},0},
|
||||||
{<<"prometheus_cowboy">>,{pkg,<<"prometheus_cowboy">>,<<"0.1.8">>},0},
|
{<<"prometheus_cowboy">>,{pkg,<<"prometheus_cowboy">>,<<"0.1.8">>},0},
|
||||||
|
Loading…
Reference in New Issue
Block a user