Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'hotfix/0.11'

  • Loading branch information...
commit 64562676d83834b1faf0d280443219f4a52b0e09 2 parents 75d5125 + 0fd157f
@wrboyce authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/erb_config_server.erl
View
7 src/core/erb_config_server.erl
@@ -69,6 +69,7 @@ init([]) ->
mnesia:create_table(bot_config, [{type, set}, {disc_copies, [node()]}, {attributes, record_info(fields, bot_config)}]),
mnesia:create_table(config, [{type, set}, {disc_copies, [node()]}, {attributes, record_info(fields, config)}]),
mnesia:create_table(server, [{type, set}, {disc_copies, [node()]}, {attributes, record_info(fields, server)}]),
+ ok = mnesia:wait_for_tables([bot_config,server,config], 5000),
{ok, #state{}}.
%% -------------------------------------------------------------------
@@ -94,9 +95,9 @@ handle_call(getBots, _From, State) ->
Q = qlc:q([
C || C <- mnesia:table(bot_config),
C#bot_config.enabled =:= true]),
- {atomic, BotConfigs} = mnesia:transaction(fun() -> qlc:e(Q) end),
- Bots = lists:map(fun(C) -> bot_from_config(C) end, BotConfigs),
- {reply, {ok, Bots}, State};
+ {atomic, BotConfigs} = mnesia:transaction(fun() -> qlc:e(Q) end),
+ Bots = lists:map(fun(C) -> bot_from_config(C) end, BotConfigs),
+ {reply, {ok, Bots}, State};
handle_call({getServers, NetworkId}, _From, State) ->
Q = qlc:q([{S#server.host, S#server.port} || S <- mnesia:table(server),
Please sign in to comment.
Something went wrong with that request. Please try again.