-
Notifications
You must be signed in to change notification settings - Fork 19
Move keeper scheduling off Vercel Cron #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Keepers Schedule | ||
|
|
||
| on: | ||
| schedule: | ||
| # Accrual keeper: every 15 minutes | ||
| - cron: '*/15 * * * *' | ||
| # Rebalance keeper: every hour | ||
| - cron: '0 * * * *' | ||
| workflow_dispatch: # allow manual triggering for debugging | ||
|
|
||
| jobs: | ||
| trigger-keepers: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Trigger Accrual Keeper | ||
| if: github.event.schedule == '*/15 * * * *' || github.event_name == 'workflow_dispatch' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This condition and the one on line 22 both independently allow |
||
| run: | | ||
| curl -f -X POST "${{ secrets.API_BASE_URL }}/api/v1/keepers/accrue" \ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| -H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" | ||
|
|
||
| - name: Trigger Rebalance Keeper | ||
| if: github.event.schedule == '0 * * * *' || github.event_name == 'workflow_dispatch' | ||
| run: | | ||
| curl -f -X POST "${{ secrets.API_BASE_URL }}/api/v1/keepers/rebalance" \ | ||
| -H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
timeout-minuteson this job. A hung endpoint can block the runner up to GitHub's 6-hour default, which also delays the next scheduled tick if runs overlap.