Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindh123 authored and arvindh123 committed Apr 24, 2020
1 parent bba0c3b commit 5fb1f40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mqtt2pgsql.erl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ on_message_publish(Message, Env) ->
Values = string:join(["'" ++ mqtt2pgsql:cts(X) ++ "'" || X <- lists:map( fun(HeaderBin) -> maps:get(HeaderBin, PayloadMap) end,HeadersBin)], ","),
Query = io_lib:format("INSERT INTO ~s.~s (~s) VALUES(~s) ~n", [mqtt2pgsql:cts(lists:nth(SchemaNo,Topic)), Table, Headers, Values] ),
% io:format("Query - ~s~n", [Query]),
lists:nth(rand:uniform(length(PidNames)), PidNames)
% lists:nth(rand:uniform(length(PidNames)), PidNames)
% mqtt2pgsql:write(list_to_atom(lists:flatten(io_lib:format("connection_~p", [rand:uniform(10)]))), Query, Env);
mqtt2pgsql:write(lists:nth(rand:uniform(length(PidNames)), PidNames), Query, Env);

Expand Down

0 comments on commit 5fb1f40

Please sign in to comment.