Skip to content

Commit 3e42bd5

Browse files
committed
rabbit_khepri: Remove projection registration from setup/0
1 parent 3860c1e commit 3e42bd5

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

deps/rabbit/src/rabbit_khepri.erl

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ setup(_) ->
269269
RetryTimeout = retry_timeout(),
270270
case khepri_cluster:wait_for_leader(?STORE_ID, RetryTimeout) of
271271
ok ->
272-
wait_for_register_projections(),
273272
?LOG_DEBUG(
274273
"Khepri-based " ?RA_FRIENDLY_NAME " ready",
275274
#{domain => ?RMQLOG_DOMAIN_GLOBAL}),
@@ -289,27 +288,6 @@ retry_timeout() ->
289288
undefined -> 30000
290289
end.
291290

292-
retry_limit() ->
293-
case application:get_env(rabbit, khepri_leader_wait_retry_limit) of
294-
{ok, T} -> T;
295-
undefined -> 10
296-
end.
297-
298-
wait_for_register_projections() ->
299-
wait_for_register_projections(retry_timeout(), retry_limit()).
300-
301-
wait_for_register_projections(_Timeout, 0) ->
302-
exit(timeout_waiting_for_khepri_projections);
303-
wait_for_register_projections(Timeout, Retries) ->
304-
rabbit_log:info("Waiting for Khepri projections for ~tp ms, ~tp retries left",
305-
[Timeout, Retries - 1]),
306-
case register_projections() of
307-
ok ->
308-
ok;
309-
{error, timeout} ->
310-
wait_for_register_projections(Timeout, Retries -1)
311-
end.
312-
313291
%% @private
314292

315293
-spec init() -> Ret when

0 commit comments

Comments
 (0)