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,
|
||||
adapter: Sqlite.Ecto2,
|
||||
loggers: [],
|
||||
database: "tmp/#{repo}_dev.sqlite3"
|
||||
database: "tmp/#{repo}_dev.sqlite3",
|
||||
pool_size: 1
|
||||
end
|
||||
|
||||
config :farmbot, Farmbot.System.ConfigStorage,
|
||||
adapter: Sqlite.Ecto2,
|
||||
loggers: [],
|
||||
database: "tmp/#{Farmbot.System.ConfigStorage}_dev.sqlite3"
|
||||
database: "tmp/#{Farmbot.System.ConfigStorage}_dev.sqlite3",
|
||||
pool_size: 1
|
||||
|
||||
# Configure Farmbot Behaviours.
|
||||
# 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])
|
||||
public_key = body |> JOSE.JWK.from_pem
|
||||
# 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} ->
|
||||
state = %{web: web, bot_state: nil, sockets: [], public_key: public_key}
|
||||
Process.link(state.web)
|
||||
|
|
|
@ -9,6 +9,7 @@ defmodule Farmbot.System.Debug do
|
|||
def init([]) do
|
||||
options = [
|
||||
port: 5000,
|
||||
acceptors: 3,
|
||||
dispatch: [
|
||||
{:_, [
|
||||
{"/wobserver/ws", Wobserver.Web.Client, []},
|
||||
|
|
|
@ -12,6 +12,7 @@ defmodule Farmbot.Host.TargetConfiguratorTest.Supervisor do
|
|||
Farmbot.Host.TargetConfiguratorTest,
|
||||
[],
|
||||
port: 4000,
|
||||
acceptors: 3,
|
||||
dispatch: [dispatch()]
|
||||
)]
|
||||
supervise(children, [strategy: :one_for_one])
|
||||
|
|
|
@ -60,7 +60,8 @@ defmodule Farmbot.Target.Bootstrap.Configurator do
|
|||
:http,
|
||||
Farmbot.Target.Bootstrap.Configurator.Router,
|
||||
[],
|
||||
port: 80
|
||||
port: 80,
|
||||
acceptors: 3
|
||||
),
|
||||
worker(Farmbot.Target.Bootstrap.Configurator.CaptivePortal, [])
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue