chore: Bump version to 0.6.0, fix tests
Some checks failed
CI / Test (OTP 27.2 / Elixir 1.18.2) (push) Failing after 0s
CI / Test (OTP 28.4 / Elixir 1.19.4 + E2E) (push) Failing after 0s
Release / Release Gate (push) Failing after 0s
Release / Build and publish image (push) Has been skipped

This commit is contained in:
2026-03-18 21:29:58 +01:00
parent fc3d121599
commit 3e5bf462e9
8 changed files with 30 additions and 24 deletions

View File

@@ -22,16 +22,7 @@ defmodule Parrhesia.Storage.Adapters.Memory.Store do
audit_logs: []
}
def ensure_started do
with :ok <- ensure_agent_started() do
Agent.get(@name, fn state ->
ensure_tables_started()
state
end)
:ok
end
end
def ensure_started, do: start_store()
def put_event(event_id, event) when is_binary(event_id) and is_map(event) do
:ok = ensure_started()
@@ -182,14 +173,6 @@ defmodule Parrhesia.Storage.Adapters.Memory.Store do
Agent.get_and_update(@name, fun)
end
defp ensure_agent_started do
if Process.whereis(@name) do
:ok
else
start_store()
end
end
defp start_store do
case Agent.start_link(&init_state/0, name: @name) do
{:ok, _pid} -> :ok