Skip to content

Commit

Permalink
fix: Use proper RPC timeouts (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecabaco committed Sep 10, 2024
1 parent 89da432 commit afb592b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions lib/realtime/database.ex
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,7 @@ defmodule Realtime.Database do
do: transaction_catched(db_conn, func, opts)

def transaction(db_conn, func, opts),
do:
Rpc.enhanced_call(node(db_conn), __MODULE__, :transaction, [db_conn, func, opts],
timeout: 15_000
)
do: Rpc.enhanced_call(node(db_conn), __MODULE__, :transaction, [db_conn, func, opts])

defp transaction_catched(db_conn, func, opts) do
Postgrex.transaction(db_conn, func, opts)
Expand Down
4 changes: 1 addition & 3 deletions lib/realtime/operations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ defmodule Realtime.Operations do
[node() | Node.list()]
|> Task.async_stream(
fn node ->
Rpc.enhanced_call(node, __MODULE__, :kill_connections_to_tenant_id, [tenant_id, reason],
timeout: 5000
)
Rpc.enhanced_call(node, __MODULE__, :kill_connections_to_tenant_id, [tenant_id, reason])
end,
timeout: 5000
)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Realtime.MixProject do
def project do
[
app: :realtime,
version: "2.32.5",
version: "2.32.6",
elixir: "~> 1.16.0",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit afb592b

Please sign in to comment.