summaryrefslogtreecommitdiff
path: root/src/rabbit_upgrade_functions.erl
diff options
context:
space:
mode:
authorVlad Alexandru Ionescu <vlad@rabbitmq.com>2011-02-20 16:37:07 -0600
committerVlad Alexandru Ionescu <vlad@rabbitmq.com>2011-02-20 16:37:07 -0600
commit95f2121cc5e3da61960c06ab95258074a26b531b (patch)
treea5d75de04e8ae61cbeb7a48850790ad9dac0dc00 /src/rabbit_upgrade_functions.erl
parent3a09b6284ebe1395de7c02a225f88facc8303073 (diff)
downloadrabbitmq-server-95f2121cc5e3da61960c06ab95258074a26b531b.tar.gz
less wait_for_tables
Diffstat (limited to 'src/rabbit_upgrade_functions.erl')
-rw-r--r--src/rabbit_upgrade_functions.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rabbit_upgrade_functions.erl b/src/rabbit_upgrade_functions.erl
index 36d1f2dc..d6a79590 100644
--- a/src/rabbit_upgrade_functions.erl
+++ b/src/rabbit_upgrade_functions.erl
@@ -49,6 +49,7 @@
%% point.
remove_user_scope() ->
+ rabbit_mnesia:wait_for_tables([rabbit_user_permission]),
transform(
rabbit_user_permission,
fun ({user_permission, UV, {permission, _Scope, Conf, Write, Read}}) ->
@@ -57,6 +58,7 @@ remove_user_scope() ->
[user_vhost, permission]).
hash_passwords() ->
+ rabbit_mnesia:wait_for_tables([rabbit_user]),
transform(
rabbit_user,
fun ({user, Username, Password, IsAdmin}) ->
@@ -66,6 +68,7 @@ hash_passwords() ->
[username, password_hash, is_admin]).
add_ip_to_listener() ->
+ rabbit_mnesia:wait_for_tables([rabbit_listener]),
transform(
rabbit_listener,
fun ({listener, Node, Protocol, Host, Port}) ->
@@ -75,6 +78,7 @@ add_ip_to_listener() ->
internal_exchanges() ->
Tables = [rabbit_exchange, rabbit_durable_exchange],
+ rabbit_mnesia:wait_for_tables(Tables),
AddInternalFun =
fun ({exchange, Name, Type, Durable, AutoDelete, Args}) ->
{exchange, Name, Type, Durable, AutoDelete, false, Args}
@@ -86,6 +90,7 @@ internal_exchanges() ->
ok.
user_to_internal_user() ->
+ rabbit_mnesia:wait_for_tables([rabbit_user]),
transform(
rabbit_user,
fun({user, Username, PasswordHash, IsAdmin}) ->