-
Notifications
You must be signed in to change notification settings - Fork 0
feat: revalidation cron changed to gbfs #95
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
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 |
|---|---|---|
|
|
@@ -2,7 +2,11 @@ | |
| "crons": [ | ||
| { | ||
| "path": "/api/revalidate", | ||
| "schedule": "0 9 * * *" | ||
| "schedule": "0 4 * * 1-6" | ||
| }, | ||
| { | ||
| "path": "/api/revalidate", | ||
| "schedule": "0 7 * * 0" | ||
|
Contributor
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. [question] these two schedules are specific to gbfs feeds. is it specified anywhere?
Contributor
Author
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. it's documented in
Contributor
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. so calling /api/revalidate with no parameters automatically revalidates all gbfs feeds?
Contributor
Author
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. for the
Contributor
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. I think the current approach couples the GBFS scope to "no params passed," which feels a bit implicit. A few concerns:
Would it make sense to either:
Either would make the schedules self-documenting and avoid relying on the "no params = GBFS" convention. wdyt?
Contributor
Author
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. I agree that at the moment it's a little generic, adding gbfs in the path or as a param would make it much more clear when reading at a glance |
||
| } | ||
| ] | ||
| } | ||
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.
isn't it a POST?
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.
For Vercel Cron job they use GET, for external API we use POST