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

Add vanish_requests stream subscriber #31

Merged
merged 2 commits into from
Oct 18, 2024
Merged

Add vanish_requests stream subscriber #31

merged 2 commits into from
Oct 18, 2024

Conversation

dcadenas
Copy link
Contributor

This is part of https://github.com/planetary-social/infrastructure/issues/139

Subscribes to the vanish_subscriber stream so we can drop pubkey nodes and their relationships. It also updates the cached counters.

Notice we still would need to add some state to all the subscribers of this stream to avoid accepting republications. We can always restart the processing of the vanish requests from the beginning periodically as a quick cleanup but this will need to be implemented at another moment to be able to hit the deadline.

This was manually tested sucessfully, with more time I'd like to add some tests.

@coveralls
Copy link

coveralls commented Oct 16, 2024

Pull Request Test Coverage Report for Build 11404435878

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 69.908%

Totals Coverage Status
Change from base Build 11350232944: -0.1%
Covered Lines: 1513
Relevant Lines: 1729

💛 - Coveralls

Copy link
Member

@mplorentz mplorentz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me! I had one question, but don't want to hold up the merge.


info!("Removed public key {} from vanish request", public_key.to_hex());

last_id = stream_id.id.clone();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this get stored somewhere other than memory?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks!

@dcadenas dcadenas merged commit 8ca9998 into main Oct 18, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants