-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_cron_status.sh
More file actions
executable file
·30 lines (25 loc) · 1.04 KB
/
check_cron_status.sh
File metadata and controls
executable file
·30 lines (25 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Check if cron job is working and web service stopped polling
echo "Checking PR Dashboard Status"
echo "============================"
# Check if web service is still trying to update (it shouldn't be)
echo "1. Checking web service logs for background job attempts:"
echo " (Should NOT see any BackgroundJobs entries after deploy)"
echo ""
# Check last update time
echo "2. Checking last update time:"
curl -s "https://ai-dashboards.onrender.com/api/v1/reviews" | jq '.last_updated'
echo ""
# Check for rate limit errors in admin endpoint
if [ -n "$ADMIN_TOKEN" ]; then
echo "3. Checking background job logs:"
curl -s "https://ai-dashboards.onrender.com/api/v1/admin/background_job_logs?token=$ADMIN_TOKEN" | jq '.'
else
echo "3. Set ADMIN_TOKEN environment variable to check admin endpoints"
fi
echo ""
echo "Next Steps:"
echo "- Your web service should deploy in ~2 minutes"
echo "- No more rate limit errors after deploy!"
echo "- Check cron job logs in Render dashboard"
echo "- Cron job runs every 30 minutes during business hours"