Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'strategy' to pool configartion options. #15

Merged
merged 10 commits into from
May 17, 2019
Prev Previous commit
Next Next commit
Adding logg entries for analysis.
  • Loading branch information
MouseRider committed Apr 29, 2019
commit 7d81cc77d0380194a8845f208d3ed0440d8039c3
6 changes: 6 additions & 0 deletions lib/machine_gun.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ defmodule MachineGun do

alias MachineGun.{Supervisor, Worker}

require Logger

@default_request_timeout 5000
@default_pool_timeout 1000
@default_pool_size 4
Expand Down Expand Up @@ -167,6 +169,8 @@ defmodule MachineGun do
|> Map.get(:conn_opts, %{})
)

Logger.info "Conn_ops before merge: #{inspect conn_opts}"

conn_opts =
%{
retry: 0,
Expand All @@ -176,6 +180,8 @@ defmodule MachineGun do
}
|> Map.merge(conn_opts)

Logger.info "Conn_ops after merge: #{inspect conn_opts}"

case ensure_pool(pool, host, port, size, max_overflow, conn_opts) do
:ok ->
do_request(pool, url, request, pool_timeout, request_timeout)
Expand Down