forked from mendableai/firecrawl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mendableai#265 from mendableai/feat/issue-264
[Feat] Added route to clean completed jobs and a github action cron that triggers every 24h
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Clean Before 24h Completed Jobs | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
env: | ||
BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }} | ||
|
||
jobs: | ||
clean-jobs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send GET request to clean jobs | ||
run: | | ||
response=$(curl --write-out '%{http_code}' --silent --output /dev/null https://api.firecrawl.dev/admin/${{ secrets.BULL_AUTH_KEY }}/clean-before-24h-complete-jobs) | ||
if [ "$response" -ne 200 ]; then | ||
echo "Failed to clean jobs. Response: $response" | ||
exit 1 | ||
fi | ||
echo "Successfully cleaned jobs. Response: $response" |
This file contains 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