Skip to content

Commit

Permalink
fix: start proxy on two ports (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
abc3 authored Jul 20, 2023
1 parent 2516771 commit 3a80111
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.15
0.2.16
9 changes: 5 additions & 4 deletions lib/supavisor/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ defmodule Supavisor.Application do
)

proxy_ports = [
{Application.get_env(:supavisor, :proxy_port_transaction), :transaction},
{Application.get_env(:supavisor, :proxy_port_session), :session}
{:pg_proxy_transaction, Application.get_env(:supavisor, :proxy_port_transaction),
:transaction},
{:pg_proxy_session, Application.get_env(:supavisor, :proxy_port_session), :session}
]

for {port, mode} <- proxy_ports do
for {key, port, mode} <- proxy_ports do
:ranch.start_listener(
:pg_proxy,
key,
:ranch_tcp,
%{
max_connections: String.to_integer(System.get_env("MAX_CONNECTIONS") || "25000"),
Expand Down

0 comments on commit 3a80111

Please sign in to comment.