-
Notifications
You must be signed in to change notification settings - Fork 15
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
SIP-28: Background Events #150
Conversation
|
||
The RPC method takes two parameters: | ||
|
||
- `date` - An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time and optional timezone offset. |
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.
Is date
preferred to letting the caller specify a number of seconds or something?
Wondering what is the simplest for developers.
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.
- Notice that we have minute rather than second level precision.
- Conversion to ISO strings is a single call to
date.toISOString()
. - What happens to seconds when daylight time change happens?
- What happens to seconds when user travels between timezones. local-time vs UTC distinction is an edge case here, where local-time changes while UTC one doesn't
SIPS/sip-28.md
Outdated
|
||
### Snap Manifest | ||
|
||
This SIP introduces a new permission `endowment:background-events`. This permissions grants a Snap the ability to schedule future events. |
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.
Wondering if we should somehow merge this with cronjobs 🤔 Otherwise, we'll have two permissions that do extremely similar things 😄
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.
You mean like using endowment:cronjobs
and just allowing two new RPC methods? Your call - I'm okay with either way.
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.
WDYT @Mrtenz?
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.
I think we eventually want to rename cronjobs to background events, but doing so will be a breaking change.
This PR proposes a SIP that allows a developer to schedule one-off events in the future.