Repair Waitlists #3627
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |