Skip to content

Commit

Permalink
Remove federation_up/0 check
Browse files Browse the repository at this point in the history
Decorators are only executed if the plugin is enabled (registered in
rabbit_queue_decorator), thus initialising the links through `startup`.
There is no obvious way for a fed link to start if the plugin isn't running,
so this check can be removed.
  • Loading branch information
dcorbacho committed Mar 4, 2021
1 parent 00510fe commit b9836cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ handle_call(Msg, _From, State) ->
{stop, {unexpected_call, Msg}, State}.

handle_cast(maybe_go, State = {not_started, _Args}) ->
case federation_up() of
true -> go(State);
false ->
_ = timer:apply_after(1000, ?MODULE, go, []),
{noreply, State}
end;
go(State);

handle_cast(go, S0 = {not_started, _Args}) ->
go(S0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ handle_call(Msg, _From, State) ->
{stop, {unexpected_call, Msg}, State}.

handle_cast(maybe_go, State) ->
case federation_up() of
true -> go(State);
false ->
_ = timer:apply_after(1000, ?MODULE, go, []),
{noreply, State}
end;
go(State);

handle_cast(go, State = #not_started{}) ->
go(State);
Expand Down

0 comments on commit b9836cc

Please sign in to comment.