summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Bakken <luke@bakken.io>2017-06-28 09:19:16 -0700
committerLuke Bakken <luke@bakken.io>2017-06-28 09:19:16 -0700
commit744e6991d226e87904672b227230732de59cc322 (patch)
tree79625e39932746c5fff8a01278812caa7dd114fa /src
parentdbeb08a20446d72ff69e1c7b49095f2d27d12b45 (diff)
downloadrabbitmq-server-git-744e6991d226e87904672b227230732de59cc322.tar.gz
Add list_local_names function
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_amqqueue.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 3eaf7613ee..fa7491104b 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -25,7 +25,7 @@
check_exclusive_access/2, with_exclusive_access_or_die/3,
stat/1, deliver/2, requeue/3, ack/3, reject/4]).
-export([list/0, list/1, info_keys/0, info/1, info/2, info_all/1, info_all/2,
- info_all/5, info_local/1, list_names/0]).
+ info_all/5, info_local/1, list_names/0, list_local_names/0]).
-export([list_down/1]).
-export([force_event_refresh/1, notify_policy_changed/1]).
-export([consumers/1, consumers_all/1, consumers_all/3, consumer_info_keys/0]).
@@ -571,6 +571,11 @@ list() -> mnesia:dirty_match_object(rabbit_queue, #amqqueue{_ = '_'}).
list_names() -> mnesia:dirty_all_keys(rabbit_queue).
+list_local_names() ->
+ [ Q#amqqueue.name || #amqqueue{state = State, pid = QPid} = Q <- list(),
+ State =/= crashed,
+ node() =:= node(QPid) ].
+
list(VHostPath) -> list(VHostPath, rabbit_queue).
%% Not dirty_match_object since that would not be transactional when used in a