Skip to content

Commit 76b4c16

Browse files
sivadaboiclaude
andcommitted
feat(ci): relay keepalive — ping /health every 10 min
Single-file activation on main (GitHub only runs scheduled workflows from the default branch); the same file ships with dev's next merge. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 71e3373 commit 76b4c16

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Relay keepalive
2+
3+
# Render's free tier idles the relay out after ~15 quiet minutes, which
4+
# stalls the first internet sync after any quiet period (cold start).
5+
# Pinging /health every 10 minutes keeps it warm. A single always-on
6+
# service fits inside Render's 750 free hours/month.
7+
#
8+
# NOTE: GitHub only runs `schedule` triggers from the default branch —
9+
# this workflow is inert until it exists on main.
10+
11+
on:
12+
schedule:
13+
- cron: "*/10 * * * *"
14+
workflow_dispatch:
15+
16+
permissions: {}
17+
18+
jobs:
19+
ping:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Ping relay /health
23+
run: |
24+
for i in 1 2 3; do
25+
code=$(curl -s -o /dev/null -w '%{http_code}' -m 30 https://opensave-relay.onrender.com/health || echo 000)
26+
if [ "$code" = "200" ]; then
27+
echo "relay healthy (attempt $i)"
28+
exit 0
29+
fi
30+
echo "attempt $i: HTTP $code — retrying in 20s (cold start?)"
31+
sleep 20
32+
done
33+
# Surface the problem without spamming red X's for transient
34+
# Render hiccups — the warning shows on the run and in the UI.
35+
echo "::warning::relay did not respond healthy after 3 attempts"

0 commit comments

Comments
 (0)