fix(s3): fix the convert function if the mode is missing
This commit is contained in:
parent
1899cf2daf
commit
adaf238131
|
@ -238,12 +238,12 @@ convert_actions(undefined, _) ->
|
||||||
|
|
||||||
convert_action(Conf = #{<<"parameters">> := Params, <<"resource_opts">> := ResourceOpts}, _) ->
|
convert_action(Conf = #{<<"parameters">> := Params, <<"resource_opts">> := ResourceOpts}, _) ->
|
||||||
case Params of
|
case Params of
|
||||||
#{<<"mode">> := <<"direct">>} ->
|
#{<<"mode">> := <<"aggregated">>} ->
|
||||||
|
Conf;
|
||||||
|
#{} ->
|
||||||
%% NOTE: Disable batching for direct uploads.
|
%% NOTE: Disable batching for direct uploads.
|
||||||
NResourceOpts = ResourceOpts#{<<"batch_size">> => 1, <<"batch_time">> => 0},
|
NResourceOpts = ResourceOpts#{<<"batch_size">> => 1, <<"batch_time">> => 0},
|
||||||
Conf#{<<"resource_opts">> := NResourceOpts};
|
Conf#{<<"resource_opts">> := NResourceOpts}
|
||||||
#{} ->
|
|
||||||
Conf
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% Interpreting options
|
%% Interpreting options
|
||||||
|
|
Loading…
Reference in New Issue