Skip to content

Commit

Permalink
Merge pull request #128 from lpgauth/upkeep/OTP-26
Browse files Browse the repository at this point in the history
Build on OTP-26
  • Loading branch information
lpgauth authored May 26, 2023
2 parents 3bd5df0 + fb09a25 commit a4f7d82
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
erlang: [21, 22, 23, 24, 25]
erlang: [21, 22, 23, 24, 25, 26]

container:
image: erlang:${{ matrix.erlang }}
Expand Down
2 changes: 1 addition & 1 deletion include/shackle.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
-type server_name() :: atom().
-type server_opts() :: {pool_name(), server_index(), client(), client_options()}.
-type socket() :: inet:socket() | ssl:sslsocket().
-type socket_option() :: gen_tcp:connect_option() | gen_udp:option() | ssl:connect_option().
-type socket_option() :: gen_tcp:connect_option() | gen_udp:option() | ssl:tls_client_option().
-type socket_options() :: [socket_option()].
-type table() :: atom().
-type time() :: pos_integer().
Expand Down
2 changes: 2 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
{metal, "0.1.1"}
]}.

{dialyzer, [{plt_extra_apps, [public_key]}]}.

{edoc_opts, [
{app_default, "http://www.erlang.org/doc/man"},
{doclet, edown_doclet},
Expand Down
4 changes: 2 additions & 2 deletions rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ case erlang:function_exported(rebar3, main, 1) of
false ->
[{deps, [
{foil, ".*",
{git, "https://github.com/lpgauth/foil.git", {tag, "0.1.1"}}},
{git, "https://github.com/lpgauth/foil.git", {tag, "0.1.3"}}},
{granderl, ".*",
{git, "https://github.com/tokenrove/granderl.git", {ref, "e1ec2ea981e6aa9a36ad4bc291b0b56c39e1e646"}}},
{git, "https://github.com/tokenrove/granderl.git", {ref, "baafd1bc825cb1fc022760eae913f774fa6af91b"}}},
{metal, ".*",
{git, "https://github.com/lpgauth/metal.git", {tag, "0.1.1"}}}
]} | lists:keydelete(deps, 1, CONFIG)]
Expand Down
3 changes: 2 additions & 1 deletion src/shackle.erl
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ cast(PoolName, Request, Pid) ->

cast(PoolName, Request, Pid, Timeout) ->
Timestamp = os:timestamp(),
Ref = make_ref(),
case shackle_pool:server(PoolName) of
{ok, Client, Server} ->
RequestId = {Server, make_ref()},
RequestId = {Server, Ref},
Server ! {Request, #cast {
client = Client,
pid = Pid,
Expand Down
1 change: 1 addition & 0 deletions src/shackle_hooks.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-module(shackle_hooks).
-include("shackle_internal.hrl").

-dialyzer({nowarn_function, metrics/4}).
-ignore_xref([
{shackle_hooks_foil, lookup, 1}
]).
Expand Down
4 changes: 3 additions & 1 deletion src/shackle_pool.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
-module(shackle_pool).
-include("shackle_internal.hrl").

-dialyzer({nowarn_function, options/1}).
-dialyzer({nowarn_function, server/3}).
-ignore_xref([
{shackle_pool_foil, lookup, 1}
]).
Expand Down Expand Up @@ -150,9 +152,9 @@ server(Name, #pool_options {
case shackle_status:active(ServerId) of
true ->
{ok, Backlog} = shackle_pool_foil:lookup({Name, backlog}),
{ok, ServerName} = shackle_pool_foil:lookup(ServerId),
case shackle_backlog:check(Backlog, ServerId, BacklogSize) of
true ->
{ok, ServerName} = shackle_pool_foil:lookup(ServerId),
{ok, Client, ServerName};
false ->
?METRICS(Client, counter, <<"backlog_full">>),
Expand Down
2 changes: 1 addition & 1 deletion src/shackle_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

%% public
-spec ets_options() ->
ets:options().
list().

-ifdef(DECENTRALIZED_COUNTERS).

Expand Down

0 comments on commit a4f7d82

Please sign in to comment.