From: Kai Moritz Date: Mon, 29 Aug 2022 16:54:27 +0000 (+0200) Subject: Vorführ-Skript überarbeitet: Vereinfachte Abfrage für User-Zustand X-Git-Tag: sumup-adder--vorlage---lvm-2-tage~10 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=34220a0202a28e53ff3d3cc09e77515373dfd278;p=demos%2Fkafka%2Ftraining Vorführ-Skript überarbeitet: Vereinfachte Abfrage für User-Zustand --- diff --git a/README.sh b/README.sh index 81213c1..3f74cd1 100755 --- a/README.sh +++ b/README.sh @@ -75,8 +75,8 @@ echo "Resultate für klaus von adder-2" http :8092/results/klaus | jq .[].sum | uniq docker-compose stop adder-2 -while [[ "$(http :8091/results | jq -r '.[]|contains({peter})' | grep true)" != "true" ]]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done -while [[ "$(http :8091/results | jq -r '.[]|contains({klaus})' | grep true)" != "true" ]]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/peter 2> /dev/null) ]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/klaus 2> /dev/null) ]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done echo "Resultate für adder-1" http -v --pretty none -S :8091/results @@ -90,8 +90,8 @@ http :8091/results/klaus | jq .[].sum | uniq docker-compose kill -s 9 adder-1 docker-compose start adder-1 while ! [[ $(http 0:8091/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for adder-1..."; sleep 1; done -while [[ "$(http :8091/results | jq -r '.[]|contains({peter})' | grep true)" != "true" ]]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done -while [[ "$(http :8091/results | jq -r '.[]|contains({klaus})' | grep true)" != "true" ]]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/peter 2> /dev/null) ]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/klaus 2> /dev/null) ]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done echo "Resultate für adder-1" http -v --pretty none -S :8091/results