From 7e0d8278fd0b92058b0f0d7aaa50e2e2a089f06b Mon Sep 17 00:00:00 2001 From: Mikhail Uvarov Date: Tue, 7 Jun 2022 11:14:56 +0200 Subject: [PATCH] Fix review comments --- .circleci/template.yml | 6 +++--- src/http_upload/mod_http_upload_s3.erl | 8 +++----- src/mod_muc_rdbms.erl | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.circleci/template.yml b/.circleci/template.yml index d69d1e39c4..46aadc79cf 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -228,7 +228,7 @@ executors: - image: *OTP24 - *redis_container - *riak_container - otp_25_elasticsearch_cassandra_mnesia: + otp_25_elasticsearch_cassandra: docker: - image: *OTP25 - *redis_container @@ -842,7 +842,7 @@ workflows: filters: *all_tags - big_tests_in_docker: name: elasticsearch_and_cassandra_25 - executor: otp_25_elasticsearch_cassandra_mnesia + executor: otp_25_elasticsearch_cassandra context: mongooseim-org preset: elasticsearch_and_cassandra_mnesia db: "elasticsearch cassandra" @@ -858,6 +858,7 @@ workflows: - small_tests_24 - ldap_mnesia_24 - pgsql_mnesia_24 + - riak_mnesia_24 - dynamic_domains_pgsql_mnesia_24 - small_tests_25 @@ -866,7 +867,6 @@ workflows: - mysql_redis_25 - mssql_mnesia_25 - ldap_mnesia_25 - - riak_mnesia_24 - elasticsearch_and_cassandra_25 - dynamic_domains_pgsql_mnesia_25 - dynamic_domains_mysql_redis_25 diff --git a/src/http_upload/mod_http_upload_s3.erl b/src/http_upload/mod_http_upload_s3.erl index b80342ef4f..bbbed981b8 100644 --- a/src/http_upload/mod_http_upload_s3.erl +++ b/src/http_upload/mod_http_upload_s3.erl @@ -165,11 +165,9 @@ with_port_component(Scheme, Host, Port) -> _ -> <> end. -scheme_to_port(Scheme, Default) -> - case lists:keyfind(Scheme, 1, [{http, 80}, {https, 443}]) of - {Scheme, Port} -> Port; - _ -> Default - end. +scheme_to_port(http, _Default) -> 80; +scheme_to_port(https, _Default) -> 443; +scheme_to_port(_Scheme, Default) -> Default. -spec trim_slash(binary()) -> binary(). trim_slash(<<>>) -> diff --git a/src/mod_muc_rdbms.erl b/src/mod_muc_rdbms.erl index 2b8e09af8a..e9ff221e7e 100644 --- a/src/mod_muc_rdbms.erl +++ b/src/mod_muc_rdbms.erl @@ -258,7 +258,7 @@ execute_insert_room(HostType, MucHost, RoomName, ExtOpts) -> -spec execute_insert_aff(mongooseim:host_type(), RoomID :: room_id(), UserU :: jid:luser(), UserS :: jid:lserver(), - Res ::binary(), ExtAff :: pos_integer()) -> ok. + Res :: binary(), ExtAff :: pos_integer()) -> ok. execute_insert_aff(HostType, RoomID, UserU, UserS, Res, ExtAff) -> Args = [RoomID, UserU, UserS, Res, ExtAff], execute_successfully(HostType, muc_insert_aff, Args),