Separate read pool and harden fanout state handling

This commit is contained in:
2026-03-18 17:21:58 +01:00
parent dce473662f
commit c377ed4b62
24 changed files with 626 additions and 258 deletions

View File

@@ -1,14 +1,7 @@
defmodule Parrhesia.TestSupport.Runtime do
@moduledoc false
@required_processes [
Parrhesia.Supervisor,
Parrhesia.Config,
Parrhesia.Repo,
Parrhesia.Subscriptions.Supervisor,
Parrhesia.API.Stream.Supervisor,
Parrhesia.Web.Endpoint
]
alias Parrhesia.PostgresRepos
def ensure_started! do
if healthy?() do
@@ -19,7 +12,7 @@ defmodule Parrhesia.TestSupport.Runtime do
end
defp healthy? do
Enum.all?(@required_processes, &is_pid(Process.whereis(&1)))
Enum.all?(required_processes(), &is_pid(Process.whereis(&1)))
end
defp restart! do
@@ -32,4 +25,14 @@ defmodule Parrhesia.TestSupport.Runtime do
{:ok, _apps} = Application.ensure_all_started(:parrhesia)
:ok
end
defp required_processes do
[
Parrhesia.Supervisor,
Parrhesia.Config,
Parrhesia.Subscriptions.Supervisor,
Parrhesia.API.Stream.Supervisor,
Parrhesia.Web.Endpoint
] ++ PostgresRepos.started_repos()
end
end