fix kafka
This commit is contained in:
parent
5d20300b50
commit
9bd374e76f
@ -174,10 +174,4 @@ code_change(_OldVsn, State = #state{}, _Extra) ->
|
||||
%%%===================================================================
|
||||
|
||||
retry_connect() ->
|
||||
erlang:start_timer(?RETRY_INTERVAL, self(), connect).
|
||||
|
||||
check_produce_result(ok) ->
|
||||
true;
|
||||
check_produce_result({ok, _}) ->
|
||||
false.
|
||||
|
||||
erlang:start_timer(?RETRY_INTERVAL, self(), connect).
|
||||
@ -161,24 +161,6 @@ handle_request("POST", "/container/remove", _, #{<<"uuid">> := UUID, <<"containe
|
||||
end
|
||||
end;
|
||||
|
||||
%handle_request("POST", "/container/task_log", _, #{<<"uuid">> := UUID, <<"task_id">> := TaskId}) when is_binary(UUID), is_integer(TaskId) ->
|
||||
% case iot_host:get_pid(UUID) of
|
||||
% undefined ->
|
||||
% {ok, 200, iot_util:json_error(404, <<"host not found">>)};
|
||||
% Pid when is_pid(Pid) ->
|
||||
% case iot_host:task_log(Pid, TaskId) of
|
||||
% {ok, Ref} ->
|
||||
% case iot_host:await_reply(Ref, 5000) of
|
||||
% {ok, Result} ->
|
||||
% {ok, 200, iot_util:json_data(Result)};
|
||||
% {error, Reason} ->
|
||||
% {ok, 200, iot_util:json_error(400, Reason)}
|
||||
% end;
|
||||
% {error, Reason} when is_binary(Reason) ->
|
||||
% {ok, 200, iot_util:json_error(400, Reason)}
|
||||
% end
|
||||
% end;
|
||||
|
||||
handle_request(_, Path, _, _) ->
|
||||
Path1 = list_to_binary(Path),
|
||||
{ok, 200, iot_util:json_error(-1, <<"url: ", Path1/binary, " not found">>)}.
|
||||
@ -231,10 +213,7 @@ validate_config(Config) when is_map(Config) ->
|
||||
ok;
|
||||
_ ->
|
||||
{error, lists:map(fun erlang:iolist_to_binary/1, Errors)}
|
||||
end;
|
||||
|
||||
validate_config(_) ->
|
||||
{error, [<<"Config 必须为 map() 类型">>]}.
|
||||
end.
|
||||
|
||||
%%------------------------------------------------------------------------------
|
||||
%% 校验必选项
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user