mirror of
https://github.com/valitydev/machinery-erlang.git
synced 2024-11-06 08:45:19 +00:00
Bump to rbkmoney/machinegun_proto@ebae56f (#11)
* Update for changes in semantic
This commit is contained in:
parent
7d1cd35957
commit
4d1b63f6b1
@ -13,7 +13,7 @@
|
|||||||
{<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2},
|
{<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2},
|
||||||
{<<"mg_proto">>,
|
{<<"mg_proto">>,
|
||||||
{git,"git@github.com:rbkmoney/machinegun_proto.git",
|
{git,"git@github.com:rbkmoney/machinegun_proto.git",
|
||||||
{ref,"5c07c579014f9900357f7a72f9d10a03008b9da1"}},
|
{ref,"ebae56fe2b3e79e4eb34afc8cb55c9012ae989f8"}},
|
||||||
0},
|
0},
|
||||||
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.0.2">>},2},
|
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.0.2">>},2},
|
||||||
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.0">>},3},
|
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.0">>},3},
|
||||||
|
@ -281,7 +281,7 @@ marshal({event, Schema}, {EventID, CreatedAt, Body}) ->
|
|||||||
#mg_stateproc_Event{
|
#mg_stateproc_Event{
|
||||||
'id' = marshal(event_id, EventID),
|
'id' = marshal(event_id, EventID),
|
||||||
'created_at' = marshal(timestamp, CreatedAt),
|
'created_at' = marshal(timestamp, CreatedAt),
|
||||||
'event_payload' = marshal({schema, Schema, event}, Body)
|
'data' = marshal({schema, Schema, event}, Body)
|
||||||
};
|
};
|
||||||
|
|
||||||
marshal({signal, Schema}, {init, Args}) ->
|
marshal({signal, Schema}, {init, Args}) ->
|
||||||
@ -308,10 +308,15 @@ marshal({call_result, Schema}, {Response, #{} = V}) ->
|
|||||||
|
|
||||||
marshal({state_change, Schema}, #{} = V) ->
|
marshal({state_change, Schema}, #{} = V) ->
|
||||||
#mg_stateproc_MachineStateChange{
|
#mg_stateproc_MachineStateChange{
|
||||||
events = marshal({list, {schema, Schema, event}}, maps:get(events, V, [])),
|
events = [
|
||||||
|
#mg_stateproc_Content{data = Event}
|
||||||
|
|| Event <- marshal({list, {schema, Schema, event}}, maps:get(events, V, []))
|
||||||
|
],
|
||||||
% TODO
|
% TODO
|
||||||
% Provide this to logic handlers as well
|
% Provide this to logic handlers as well
|
||||||
aux_state = marshal({schema, Schema, aux_state}, maps:get(aux_state, V, undefined))
|
aux_state = #mg_stateproc_Content{
|
||||||
|
data = marshal({schema, Schema, aux_state}, maps:get(aux_state, V, undefined))
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
marshal(action, V) when is_list(V) ->
|
marshal(action, V) when is_list(V) ->
|
||||||
@ -427,7 +432,7 @@ unmarshal(
|
|||||||
'id' = ID,
|
'id' = ID,
|
||||||
'history' = History,
|
'history' = History,
|
||||||
'history_range' = Range,
|
'history_range' = Range,
|
||||||
'aux_state' = AuxState
|
'aux_state' = #mg_stateproc_Content{format_version = _Version, data = AuxState}
|
||||||
}
|
}
|
||||||
) ->
|
) ->
|
||||||
#{
|
#{
|
||||||
@ -446,7 +451,7 @@ unmarshal(
|
|||||||
#mg_stateproc_Event{
|
#mg_stateproc_Event{
|
||||||
'id' = EventID,
|
'id' = EventID,
|
||||||
'created_at' = CreatedAt,
|
'created_at' = CreatedAt,
|
||||||
'event_payload' = Payload
|
'data' = Payload
|
||||||
}
|
}
|
||||||
) ->
|
) ->
|
||||||
{unmarshal(event_id, EventID), unmarshal(timestamp, CreatedAt), unmarshal({schema, Schema, event}, Payload)};
|
{unmarshal(event_id, EventID), unmarshal(timestamp, CreatedAt), unmarshal({schema, Schema, event}, Payload)};
|
||||||
|
Loading…
Reference in New Issue
Block a user