Skip to content

Commit d2192fb

Browse files
committed
Prepare for adding more checks
1 parent 36f7e8d commit d2192fb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

deps/rabbit/src/rabbit_queue_type.erl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
%%
77

88
-module(rabbit_queue_type).
9+
-feature(maybe_expr, enable).
910

1011
-behaviour(rabbit_registry_class).
1112

@@ -307,7 +308,7 @@ is_compatible(Type, Durable, Exclusive, AutoDelete) ->
307308
declare(Q0, Node) ->
308309
Q = rabbit_queue_decorator:set(rabbit_policy:set(Q0)),
309310
Mod = amqqueue:get_type(Q),
310-
case check_vhost_queue_limit(Q) of
311+
case check_queue_limits(Q) of
311312
ok ->
312313
Mod:declare(Q, Node);
313314
Error ->
@@ -771,6 +772,12 @@ known_queue_type_names() ->
771772
QTypeBins = lists:map(fun(X) -> atom_to_binary(X) end, QueueTypes),
772773
?KNOWN_QUEUE_TYPES ++ QTypeBins.
773774

775+
check_queue_limits(Q) ->
776+
maybe
777+
%% Prepare for more checks
778+
ok ?= check_vhost_queue_limit(Q)
779+
end.
780+
774781
check_vhost_queue_limit(Q) ->
775782
#resource{name = QueueName} = amqqueue:get_name(Q),
776783
VHost = amqqueue:get_vhost(Q),

0 commit comments

Comments
 (0)