Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
abc3 committed Jul 26, 2023
1 parent 57521a8 commit d14e97a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/supavisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ defmodule Supavisor do
@registry Supavisor.Registry.Tenants
@type workers :: %{manager: pid, pool: pid}

@spec start(String.t(), String.t(), fun(), String.t(), atom() | nil) :: {:ok, pid} | {:error, any()}
@spec start(String.t(), String.t(), fun(), String.t(), atom() | nil) ::
{:ok, pid} | {:error, any()}
def start(tenant, user_alias, client_key, conn_user, def_mode_type \\ nil) do
case get_global_sup(tenant, conn_user) do
nil ->
Expand Down
7 changes: 5 additions & 2 deletions lib/supavisor/db_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ defmodule Supavisor.DbHandler do
Logger.debug("DB ready_for_query: #{inspect(db_state)} #{inspect(ps, pretty: true)}")
Supavisor.set_parameter_status(data.id, ps)

{:next_state, :idle, %{data | parameter_status: ps}, {:next_event, :internal, :check_buffer}}
{:next_state, :idle, %{data | parameter_status: ps},
{:next_event, :internal, :check_buffer}}
end
end

Expand Down Expand Up @@ -251,7 +252,9 @@ defmodule Supavisor.DbHandler do
end

def handle_event({:call, {pid, _} = from}, {:db_call, bin}, state, %{buffer: buff} = data) do
Logger.warning("state #{state} <-- <-- bin #{inspect(byte_size(bin))} bytes, caller: #{inspect(pid)}")
Logger.warning(
"state #{state} <-- <-- bin #{inspect(byte_size(bin))} bytes, caller: #{inspect(pid)}"
)

new_buff = [bin | buff]
reply = {:reply, from, {:buffering, IO.iodata_length(new_buff)}}
Expand Down

0 comments on commit d14e97a

Please sign in to comment.