2024-06-20 22:18:53 +08:00
|
|
|
name: Clean Every 30 Minutes Before 24h Completed Jobs
|
2024-06-12 01:18:05 +08:00
|
|
|
on:
|
|
|
|
schedule:
|
2024-06-20 22:18:53 +08:00
|
|
|
- cron: '30 * * * *'
|
2024-06-12 01:18:05 +08:00
|
|
|
|
2024-06-12 04:52:01 +08:00
|
|
|
env:
|
|
|
|
BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }}
|
|
|
|
|
2024-06-12 01:18:05 +08:00
|
|
|
jobs:
|
|
|
|
clean-jobs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Send GET request to clean jobs
|
|
|
|
run: |
|
2024-06-26 04:49:29 +08:00
|
|
|
response=$(curl --write-out '%{http_code}' --silent --output /dev/null --max-time 180 https://api.firecrawl.dev/admin/${{ secrets.BULL_AUTH_KEY }}/clean-before-24h-complete-jobs)
|
2024-06-12 01:18:05 +08:00
|
|
|
if [ "$response" -ne 200 ]; then
|
|
|
|
echo "Failed to clean jobs. Response: $response"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "Successfully cleaned jobs. Response: $response"
|