Closed suzdalnitski closed 10 months ago
I assume this is the correct approach now?
config = Conduit.EventStore.config()
{:ok, conn} = Postgrex.start_link(config)
EventStore.Storage.Initializer.reset!(conn, config)
What is the error you're getting?
For reference you can write a function to reset an event store as follows:
alias EventStore.Storage.Initializer
def reset_storage! do
config = MyEventStore.config()
with {:ok, conn} <- Postgrex.start_link(config) do
try do
Initializer.reset!(conn, config)
after
:ok = GenServer.stop(conn)
end
:ok
end
end
The following no longer works, because
reset!
now expects two args:How should we reset the storage instead? What config does it expect?
Thanks!