Format {terminated_by, Name} status for queues.

If a queue is bainf deleted and it takes some time, for example if there
are many bindings, the management UI crashes formatting the status.

Split the status and terminated_by name into proplist so fomatter
does not crash.
This commit is contained in:
Daniil Fedotov 2019-03-01 13:47:28 -05:00
parent 8f34daf3cf
commit 10dcfe9d5c
1 changed files with 3 additions and 0 deletions

View File

@ -400,6 +400,9 @@ queue(Q) when ?is_amqqueue(Q) ->
queue_state({syncing, Msgs}) -> [{state, syncing},
{sync_messages, Msgs}];
queue_state({terminated_by, Name}) ->
[{state, terminated},
{terminated_by, Name}];
queue_state(Status) -> [{state, Status}].
%% We get bindings using rabbit_binding:list_*/1 rather than :info_all/1 since