Skip to content

Commit

Permalink
Apply review comments to mod_last_rdbms
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed May 14, 2024
1 parent e25fee6 commit 1c14567
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/mod_last_rdbms.erl
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ run_upsert(HostType, _Count, QueryName, InsertParams, UpdateParams) ->
InsertParams, UpdateParams).

check_result({ok, Results}) ->
lists:foreach(fun({updated, _}) -> ok end, Results),
ok;
lists:foreach(fun({updated, _}) -> ok end, Results);
check_result({error, Reason}) ->
?LOG_ERROR(#{what => session_cleanup_failed, reason => Reason}).

Expand All @@ -173,7 +172,7 @@ bucketize(N, Records, Acc) ->
{Batch, Records2} ->
bucketize(N, Records2, [Batch | Acc])
catch error:badarg ->
{Records, lists:reverse(Acc)}
{Records, lists:reverse(Acc)}
end.

%% Create N chunks
Expand All @@ -185,7 +184,7 @@ spread(N, Tasks) ->
spread([Task | Tasks], [Bucket | Buckets], Acc) ->
spread(Tasks, Buckets, [[Task | Bucket] | Acc]);
spread([], Buckets, Acc) ->
Acc ++ lists:reverse(Buckets);
Acc ++ lists:reverse(Buckets);
spread(Tasks, [], Acc) ->
spread(Tasks, lists:reverse(Acc), []).

Expand Down

0 comments on commit 1c14567

Please sign in to comment.