From 4fbabe5a761461340678a6604ab7f6be35422444 Mon Sep 17 00:00:00 2001 From: Ilya Averyanov Date: Tue, 4 Apr 2023 13:05:02 +0300 Subject: [PATCH] fix(ft-s3): fix atom and variable naming --- apps/emqx_s3/src/emqx_s3_client.erl | 2 +- apps/emqx_s3/src/emqx_s3_profile_http_pools.erl | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/emqx_s3/src/emqx_s3_client.erl b/apps/emqx_s3/src/emqx_s3_client.erl index b84022357..99e2de4da 100644 --- a/apps/emqx_s3/src/emqx_s3_client.erl +++ b/apps/emqx_s3/src/emqx_s3_client.erl @@ -105,7 +105,7 @@ start_multipart( ) -> case erlcloud_s3:start_multipart(Bucket, key(Key), Options, Headers, AwsConfig) of {ok, Props} -> - {ok, proplists:get_value(uploadId, Props)}; + {ok, proplists:get_value('uploadId', Props)}; {error, Reason} -> ?SLOG(debug, #{msg => "start_multipart_fail", key => Key, reason => Reason}), {error, Reason} diff --git a/apps/emqx_s3/src/emqx_s3_profile_http_pools.erl b/apps/emqx_s3/src/emqx_s3_profile_http_pools.erl index e1b36c3be..73774624e 100644 --- a/apps/emqx_s3/src/emqx_s3_profile_http_pools.erl +++ b/apps/emqx_s3/src/emqx_s3_profile_http_pools.erl @@ -96,11 +96,11 @@ set_outdated(ProfileId, PoolName, Timeout) -> outdated(ProfileId) -> Now = erlang:monotonic_time(millisecond), MS = ets:fun2ms( - fun(#pool{key = {ProfileId_, PoolName}, deadline = Deadline_}) when - ProfileId_ =:= ProfileId andalso - Deadline_ =/= undefined andalso Deadline_ < Now + fun(#pool{key = {CurProfileId, CurPoolName}, deadline = CurDeadline}) when + CurProfileId =:= ProfileId andalso + CurDeadline =/= undefined andalso CurDeadline < Now -> - PoolName + CurPoolName end ), ets:select(?TAB, MS). @@ -109,8 +109,8 @@ outdated(ProfileId) -> [pool_name()]. all(ProfileId) -> MS = ets:fun2ms( - fun(#pool{key = {ProfileId_, PoolName}}) when ProfileId_ =:= ProfileId -> - PoolName + fun(#pool{key = {CurProfileId, CurPoolName}}) when CurProfileId =:= ProfileId -> + CurPoolName end ), ets:select(?TAB, MS).