From 843a704c6f041b668cf7c6083d85c231916c9506 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Mon, 22 Apr 2024 15:16:42 +0800 Subject: [PATCH] remove \r --- scripts/create-topic.sh | 10 ---------- scripts/mongo-init.sh | 6 ------ 2 files changed, 16 deletions(-) diff --git a/scripts/create-topic.sh b/scripts/create-topic.sh index 206075fb8..2b0b69c07 100755 --- a/scripts/create-topic.sh +++ b/scripts/create-topic.sh @@ -12,16 +12,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - # Wait for Kafka to be ready - KAFKA_SERVER=localhost:9092 - MAX_ATTEMPTS=300 attempt_num=1 - echo "Waiting for Kafka to be ready..." - until /opt/bitnami/kafka/bin/kafka-topics.sh --list --bootstrap-server $KAFKA_SERVER; do echo "Attempt $attempt_num of $MAX_ATTEMPTS: Kafka not ready yet..." if [ $attempt_num -eq $MAX_ATTEMPTS ]; then @@ -31,14 +26,10 @@ until /opt/bitnami/kafka/bin/kafka-topics.sh --list --bootstrap-server $KAFKA_SE attempt_num=$((attempt_num+1)) sleep 1 done - echo "Kafka is ready. Creating topics..." - - topics=("toRedis" "toMongo" "toPush") partitions=8 replicationFactor=1 - for topic in "${topics[@]}"; do if /opt/bitnami/kafka/bin/kafka-topics.sh --create \ --bootstrap-server $KAFKA_SERVER \ @@ -51,5 +42,4 @@ for topic in "${topics[@]}"; do echo "Failed to create topic $topic." fi done - echo "All topics created." diff --git a/scripts/mongo-init.sh b/scripts/mongo-init.sh index 01199c480..de3eae5cb 100755 --- a/scripts/mongo-init.sh +++ b/scripts/mongo-init.sh @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - mongosh <