This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Conversation
This pull-request largely neuters the use of ~/.rss2email/state, instead storing state of the feed-items inside a BoltDB database. The migration here is seamless: * When a feed is fetched we get a list of items. * We look to see if the item is new, in the legacy database OR the new one. * If the item is new we record it ONLY in boltdb. * THen we remove the legacy state-file. The end result is that legacy state-files will be cleaned up, and removed and all state will end up in BoltDB. The BoltDB file will continue to grow, as that is not yet pruned, but that will be an easy change to make in the future. As part of this we've also disabled CGO, and generated binaries for all platforms. This would close #82, when merged.
This avoids duplication in finding the appropriate directory in all the placse we need to refer to it.
In the past we'd expire feed-items from feeds, but if an actual feed was removed from the config-file we'd maintain the complete history fo that feed. Now we remove feeds that have been orphaned from the BoltDB. To confirm this: * Run `rss2email` with some feeds. * Comment out a feed. * Run `rss2email` to do the prunining. * Confirm it is gone with `rss2email seen`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use BoltDB to store feed-state
This pull-request largely neuters the use of ~/.rss2email/state, instead storing state of the feed-items inside a BoltDB database.
The migration here is seamless:
The end result is that legacy state-files will be cleaned up, and removed and all state will end up in BoltDB.
The BoltDB file will continue to grow, as that is not yet pruned, but that will be an easy change to make in the future.
As part of this we've also disabled CGO, and generated binaries for all platforms.
This would close #82, when merged.
Currently this is undergoing private testing, but feedback from casual observers would be most welcome!