Skip to content

Commit 49f7fb4

Browse files
CrypticDriverclaudehappy-otter
committed
checkup: wait longer for SSM result; final state before retiring the pilot soul
The pilot deployment (dogegg, 2026-07-21 → 2026-09-08) is shut down. Its life data is archived on the host as stackchan-soul-data-final-20260908.tar.gz. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1 parent 19677b9 commit 49f7fb4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎tools/checkup.sh‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ echo '[C1] device:' \$(curl -s --max-time 5 127.0.0.1:9101/goudan/devices);
2525
echo '[C2] nudges (24h):' \$(journalctl -u stackchan-soul --since '24 hours ago' --no-pager | grep -ac 被叫醒了)
2626
\"]" --query Command.CommandId --output text) || { echo "SSM send failed ✗"; exit 1; }
2727

28-
sleep 6
28+
# Poll until the invocation finishes — a fixed sleep races the SSM agent and
29+
# returns empty output on slow runs.
30+
for _ in $(seq 1 10); do
31+
sleep 5
32+
STATUS=$(aws ssm get-command-invocation --region "$REGION" --instance-id "$INSTANCE" \
33+
--command-id "$CMD_ID" --query Status --output text 2>/dev/null)
34+
[ "$STATUS" != "InProgress" ] && [ "$STATUS" != "Pending" ] && break
35+
done
2936
aws ssm get-command-invocation --region "$REGION" --instance-id "$INSTANCE" \
3037
--command-id "$CMD_ID" --query "StandardOutputContent" --output text
3138
echo "==========================================================================="

0 commit comments

Comments
 (0)