-
Notifications
You must be signed in to change notification settings - Fork 60
Populate cache from rest #190
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
Conversation
| FullApplication <$> o .: "id" | ||
| <*> o .: "name" | ||
| <*> o .: "flags" | ||
|
|
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.
Can be filled in later with all the fields https://discord.com/developers/docs/resources/application
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.
Could you make a ticket for this?
|
I'll admit, initially I wasn't on board with making an additional request at the beginning here. But now that I see we already do that, and don't use it to boot, I'm happier with this. I am still a bit iffy on us using an MVar for the cache as I slightly fear that it won't be properly filled, however I think in this case it should be fine? we might be able to rejig it but it'll add complexity I think, and I'm not sure it's worth it in this case. There's a couple other refactors that could be done here but I can do them after we merge. |
|
The compilation failures are from not including the ApplicationInfo files in the cabal exposed-modules. Adding those makes it compile. I also ran the I think it would be worth mentioning in a comment somewhere what sort of data the cache will always have, and what sort of data it will only have if the cache is enabled (guild and channel info etc). |
|
I'd be happy to approve this pending the ticket creation and a comment or two of documentation about when fields of the cache will be filled. |
| FullApplication <$> o .: "id" | ||
| <*> o .: "name" | ||
| <*> o .: "flags" | ||
|
|
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.
Could you make a ticket for this?
|
User relevant changes:
Fixes #186 |
|
I'll update the cache doc in a few hours, gtg |
L0neGamer
left a comment
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.
Good enough. If you see something else you want to change I'd request mentioning the setting for enabling the cache around the cache data structure documentation, but it should be fine.
L0neGamer
left a comment
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.
lgtm!
Populates the cache using the rest requests before the onStart handler. The cache example works unchanged: