From 1c145670b10ecf81bd1ff6ba7d305e688e6fdf74 Mon Sep 17 00:00:00 2001 From: Mikhail Uvarov Date: Tue, 14 May 2024 16:59:52 +0200 Subject: [PATCH] Apply review comments to mod_last_rdbms --- src/mod_last_rdbms.erl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mod_last_rdbms.erl b/src/mod_last_rdbms.erl index 2323b283dac..e614c14daee 100644 --- a/src/mod_last_rdbms.erl +++ b/src/mod_last_rdbms.erl @@ -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}). @@ -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 @@ -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), []).