forked from longtao.wu/droboticflow
12 lines
505 B
Bash
12 lines
505 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
bash /scripts/guard.sh
|
|
for ((i=0;i<60;i++)); do
|
|
if mongosh --quiet --host 127.0.0.1 --port 27129 --eval 'quit(db.hello().isWritablePrimary?0:1)' >/dev/null; then
|
|
mongosh --quiet --host 127.0.0.1 --port 27129 --eval 'const d=db.getSiblingDB("query25_synthetic");if(d.marker.countDocuments({_id:"query25-confirmed",value:"preserve-query25-v1"})!==1)throw Error("acknowledged marker lost");print("QUERY25_MARKER_PRESERVED");'
|
|
exit 0
|
|
fi
|
|
sleep 1
|
|
done
|
|
exit 1
|