fix: elvis problems
This commit is contained in:
parent
a153d758c3
commit
4e8dfb48b7
|
@ -74,7 +74,8 @@ connector_action_config_to_bridge_v1_config(ConnectorConfig, ActionConfig) ->
|
|||
),
|
||||
BridgeV1Config4 = maps:put(<<"pool_size">>, PoolSize, BridgeV1Config3),
|
||||
|
||||
%% Move the fields stream, partition_key and record_template from parameters in ActionConfig to the top level in BridgeV1Config
|
||||
%% Move the fields stream, partition_key and record_template from
|
||||
%% parameters in ActionConfig to the top level in BridgeV1Config
|
||||
lists:foldl(
|
||||
fun(Field, Acc) ->
|
||||
emqx_utils_maps:deep_put(
|
||||
|
|
|
@ -270,12 +270,7 @@ client_options(Config = #{url := ServerURL, ssl := SSL}) ->
|
|||
check_status(ConnectorState) ->
|
||||
try start_client(ConnectorState) of
|
||||
{ok, Client} ->
|
||||
try hstreamdb_client:echo(Client) of
|
||||
ok -> ok;
|
||||
{error, _} = ErrorEcho -> ErrorEcho
|
||||
after
|
||||
_ = hstreamdb:stop_client(Client)
|
||||
end;
|
||||
check_status_with_client(Client);
|
||||
{error, _} = StartClientError ->
|
||||
StartClientError
|
||||
catch
|
||||
|
@ -283,6 +278,14 @@ check_status(ConnectorState) ->
|
|||
{error, {ErrorType, Reason}}
|
||||
end.
|
||||
|
||||
check_status_with_client(Client) ->
|
||||
try hstreamdb_client:echo(Client) of
|
||||
ok -> ok;
|
||||
{error, _} = ErrorEcho -> ErrorEcho
|
||||
after
|
||||
_ = hstreamdb:stop_client(Client)
|
||||
end.
|
||||
|
||||
start_client(Opts) ->
|
||||
ClientOptions = maps:get(client_options, Opts),
|
||||
case hstreamdb:start_client(ClientOptions) of
|
||||
|
|
Loading…
Reference in New Issue