Bump ranch listeners down accross the app..
This commit is contained in:
parent
8031bdce40
commit
a2da261066
|
@ -33,13 +33,15 @@ for repo <- [Farmbot.Repo.A, Farmbot.Repo.B] do
|
||||||
config :farmbot, repo,
|
config :farmbot, repo,
|
||||||
adapter: Sqlite.Ecto2,
|
adapter: Sqlite.Ecto2,
|
||||||
loggers: [],
|
loggers: [],
|
||||||
database: "tmp/#{repo}_dev.sqlite3"
|
database: "tmp/#{repo}_dev.sqlite3",
|
||||||
|
pool_size: 1
|
||||||
end
|
end
|
||||||
|
|
||||||
config :farmbot, Farmbot.System.ConfigStorage,
|
config :farmbot, Farmbot.System.ConfigStorage,
|
||||||
adapter: Sqlite.Ecto2,
|
adapter: Sqlite.Ecto2,
|
||||||
loggers: [],
|
loggers: [],
|
||||||
database: "tmp/#{Farmbot.System.ConfigStorage}_dev.sqlite3"
|
database: "tmp/#{Farmbot.System.ConfigStorage}_dev.sqlite3",
|
||||||
|
pool_size: 1
|
||||||
|
|
||||||
# Configure Farmbot Behaviours.
|
# Configure Farmbot Behaviours.
|
||||||
# Default Authorization behaviour.
|
# Default Authorization behaviour.
|
||||||
|
|
|
@ -45,7 +45,7 @@ defmodule Farmbot.BotState.Transport.HTTP do
|
||||||
{:ok, {_, _, body}} = :httpc.request(:get, {'#{s}/api/public_key', []}, [], [body_format: :binary])
|
{:ok, {_, _, body}} = :httpc.request(:get, {'#{s}/api/public_key', []}, [], [body_format: :binary])
|
||||||
public_key = body |> JOSE.JWK.from_pem
|
public_key = body |> JOSE.JWK.from_pem
|
||||||
# FIXME(Connor) The router should probably be put in an externally supervised module..
|
# FIXME(Connor) The router should probably be put in an externally supervised module..
|
||||||
case Plug.Adapters.Cowboy.http Router, [], [port: @port, dispatch: [cowboy_dispatch()]] do
|
case Plug.Adapters.Cowboy.http Router, [], [port: @port, acceptors: 2, dispatch: [cowboy_dispatch()]] do
|
||||||
{:ok, web} ->
|
{:ok, web} ->
|
||||||
state = %{web: web, bot_state: nil, sockets: [], public_key: public_key}
|
state = %{web: web, bot_state: nil, sockets: [], public_key: public_key}
|
||||||
Process.link(state.web)
|
Process.link(state.web)
|
||||||
|
|
|
@ -9,6 +9,7 @@ defmodule Farmbot.System.Debug do
|
||||||
def init([]) do
|
def init([]) do
|
||||||
options = [
|
options = [
|
||||||
port: 5000,
|
port: 5000,
|
||||||
|
acceptors: 3,
|
||||||
dispatch: [
|
dispatch: [
|
||||||
{:_, [
|
{:_, [
|
||||||
{"/wobserver/ws", Wobserver.Web.Client, []},
|
{"/wobserver/ws", Wobserver.Web.Client, []},
|
||||||
|
|
|
@ -12,6 +12,7 @@ defmodule Farmbot.Host.TargetConfiguratorTest.Supervisor do
|
||||||
Farmbot.Host.TargetConfiguratorTest,
|
Farmbot.Host.TargetConfiguratorTest,
|
||||||
[],
|
[],
|
||||||
port: 4000,
|
port: 4000,
|
||||||
|
acceptors: 3,
|
||||||
dispatch: [dispatch()]
|
dispatch: [dispatch()]
|
||||||
)]
|
)]
|
||||||
supervise(children, [strategy: :one_for_one])
|
supervise(children, [strategy: :one_for_one])
|
||||||
|
|
|
@ -60,7 +60,8 @@ defmodule Farmbot.Target.Bootstrap.Configurator do
|
||||||
:http,
|
:http,
|
||||||
Farmbot.Target.Bootstrap.Configurator.Router,
|
Farmbot.Target.Bootstrap.Configurator.Router,
|
||||||
[],
|
[],
|
||||||
port: 80
|
port: 80,
|
||||||
|
acceptors: 3
|
||||||
),
|
),
|
||||||
worker(Farmbot.Target.Bootstrap.Configurator.CaptivePortal, [])
|
worker(Farmbot.Target.Bootstrap.Configurator.CaptivePortal, [])
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue