Skip to content
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

Write waifu suggestions directly to a file #35

Merged
merged 1 commit into from
Feb 25, 2024
Merged

Conversation

dgw
Copy link
Owner

@dgw dgw commented Feb 24, 2024

I decided that the complexity of caching suggestions to bot.db isn't worth it. Savings on SSD wear are likely to be negligible as this feature doesn't see heavy use, and it's actually more likely to lose data that's only cached in bot.memory if the bot crashes or otherwise fails to shut down gracefully. Plus, plugin values in the database will be truncated to a fairly short length on certain DB backends (see issue tracking this upstream, sopel-irc/sopel#2291).

Tested live adding a few waifus, viewed the file (making sure newlines were handled correctly), and then used .clearwaifus to delete it.

I decided that the complexity of caching suggestions to `bot.db` isn't
worth it. Savings on SSD wear are likely to be negligible as this
feature doesn't see heavy use, and it's actually *more* likely to lose
data that's only cached in `bot.memory` if the bot crashes or otherwise
fails to shut down gracefully. Plus, plugin values in the database will
be truncated to a fairly short length on certain DB backends (see issue
tracking this upstream, sopel-irc/sopel#2291).

Tested live adding a few waifus, viewed the file (making sure newlines
were handled correctly), and then used `.clearwaifus` to delete it.
@dgw dgw added the enhancement New feature or request label Feb 24, 2024
@dgw dgw mentioned this pull request Feb 24, 2024
5 tasks
@dgw dgw merged commit 766b503 into master Feb 25, 2024
@dgw dgw deleted the direct-suggestions branch February 25, 2024 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant