Skip to content

Repair Waitlists

Repair Waitlists #3627

name: Repair Waitlists
on:
schedule:
# Run every hour
- cron: '0 * * * *'
workflow_dispatch: # Allow manual triggering
jobs:
repair-waitlists:
runs-on: ubuntu-latest
steps:
- name: Repair Session Waitlists
run: |
response=$(curl -s -w "%{http_code}" -X POST \
-H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" \
-H "Content-Type: application/json" \
"https://www.metagame.games/api/cron/repair-waitlists")
http_code="${response: -3}"
body="${response%???}"
echo "HTTP Status: $http_code"
echo "Response: $body"
if [ "$http_code" -ne 200 ]; then
echo "❌ Waitlist repair failed with status $http_code"
echo "$body"
exit 1
else
echo "✅ Waitlist repair completed successfully"
echo "$body" | jq '.' || echo "$body"
fi