Skip to content

Commit 3bfdef3

Browse files
authored
Merge pull request cardano-foundation#7 from cardano-foundation/karknu/signal_ready
Simplify signal ready
2 parents a548606 + d9ea483 commit 3bfdef3

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

compose/sidecar/sidecar.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,17 @@ verify_environment_variables() {
2424
enable_composers() {
2525
# CONVERGENCE_COMPOSER
2626
if [ "${CONVERGENCE_COMPOSER,,}" = "true" ]; then
27-
ln -snf /opt/composer/convergence /opt/antithesis/test/v1/convergence
27+
local src_dir="/opt/composer/convergence"
28+
local dest_dir="/opt/antithesis/test/v1/convergence"
29+
30+
mkdir -p "$dest_dir"
31+
32+
for file in "$src_dir"/*; do
33+
if [ -f "$file" ]; then # Only process regular files (not directories or symlinks)
34+
local filename=$(basename "$file")
35+
ln -snf "$file" "$dest_dir/$filename"
36+
fi
37+
done
2838
fi
2939
}
3040

@@ -33,9 +43,8 @@ signal_ready() {
3343
for i in $(seq 1 "${POOLS}"); do
3444
(
3545
while true; do
36-
block_num=$(cardano-cli ping -t -q -j --magic 42 --host p${i}.example --port ${PORT} 2>/dev/null | jq -r '.tip[0].blockNo' 2>/dev/null)
37-
exit_code=${?}
38-
if [ ${exit_code} -ne 0 ]; then
46+
cardano-cli ping -c1 -q -j --magic 42 --host p${i}.example --port ${PORT} 2>/dev/null
47+
if [ $? -ne 0 ] ; then
3948
sleep 1
4049
continue
4150
else

0 commit comments

Comments
 (0)