fix kafka

This commit is contained in:
anlicheng 2025-10-31 14:56:20 +08:00
parent 5d20300b50
commit 9bd374e76f
2 changed files with 2 additions and 29 deletions

View File

@ -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).

View File

@ -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.
%%------------------------------------------------------------------------------
%%