[erlang-questions] Tracking progress of mnesia start
Mon Mar 6 17:06:42 CET 2017
I use mnesia:wait_for_tables/2 in a loop with small timeout for that.
This function returns a list of missing tables in the case of timeout.
On Mon, Mar 6, 2017 at 5:38 PM, Attila Rajmund Nohl
> I'd like to provide feedback to the user when mnesia is started in out
> application (something like "4 out of 16 tables loaded"). My first
> idea was to mnesia:subscribe for events, but I can subscribe only
> after mnesia is started, so I might miss some tables. My second idea
> is to turn on debugging, add an event module (both via setting
> environment values). It kind of works, I receive events like
> "Table ~w is loaded on ~w. s=~w, r=~w, lc=~w, f=~w, m=~w~n",
> but it depends on the format of debugging message and even though this
> message hasn't changed in the last 7 years, I'm a bit uneasy about it.
> Do you have any better idea?
> erlang-questions mailing list
More information about the erlang-questions