From a4ff6f9ae5b34db4fa3857876a7c5510476c42f2 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 31 May 2024 11:43:36 -0400 Subject: [PATCH] configure-rabbitmq: Switch to await_startup. --- scripts/setup/configure-rabbitmq | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/scripts/setup/configure-rabbitmq b/scripts/setup/configure-rabbitmq index 0d252f910e..e9ea28b008 100755 --- a/scripts/setup/configure-rabbitmq +++ b/scripts/setup/configure-rabbitmq @@ -11,20 +11,7 @@ set -eu RABBITMQ_USERNAME=$("$(dirname "$0")/../get-django-setting" RABBITMQ_USERNAME) RABBITMQ_PASSWORD=$("$(dirname "$0")/../get-django-setting" RABBITMQ_PASSWORD) -# Wait for RabbitMQ to start up -retries=29 -# Could use rabbitmqctl await_startup when we upgrade to 3.7.11. -while ! rabbitmqctl -q await_online_nodes 1 2>/dev/null; do - if ((retries == 29)); then - echo "Waiting for RabbitMQ to start up..." - fi - sleep 1 - if ! ((retries -= 1)); then - rabbitmqctl -q await_online_nodes 1 - break - fi -done - +rabbitmqctl await_startup rabbitmqctl delete_user "$RABBITMQ_USERNAME" || true rabbitmqctl delete_user zulip || true rabbitmqctl delete_user guest || true