Resync room information on startup / Redo room state management #70
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: projectmoon/tenebrous-dicebot#70
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The bot needs to sync info about all rooms it's in on startup. All of the code for this is present. We just need to add the part where it loops through the rooms it's in and calls resync on each one as a fire-and-forget task.
But on the other hand, do we actually need to store this information at all? It's already in the state store. This is only true if we can ask the SDK what rooms another user that isn't the bot is in.
After some testing on a small set of rooms, the SDK takes about 5ms to calculate this, while sqlite is capable of caching the query result. Problem is my code that stores users in rooms is broken, while the SDK always works. And if we add another caching layer (Redis) to the bot, for use with pub-sub anyway, we can also just cache things in redis if necessary.
No longer necessary because of PR #71.