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

Vanish requests #29

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Vanish requests #29

merged 3 commits into from
Oct 15, 2024

Conversation

dcadenas
Copy link
Contributor

Adds a vanish_requests stream subscription to remove info for specific pubkeys. This is for https://github.com/planetary-social/infrastructure/issues/139

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.

A couple minor comments, but I'm sure you can take care of them easily. Approved!

@@ -25,11 +25,33 @@ async function initializeRedis() {
}
}

async function getRedisClient() {
async function initializeRemoteRedis() {
Copy link
Member

Choose a reason for hiding this comment

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

I find "local" and "remote" redis a little confusing. Is the local redis for storing name/pubkey pairs, and remote is for the vanish requests? I think this could use some more documentation at least. Maybe even a rename to "nameRedis" and "vanishRequestRedis" or something like that would be good.

And ideally someday we can refactor down to one Redis instance?

Copy link
Member

Choose a reason for hiding this comment

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

oh yeah, down in src/server.js they have nicer names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed them to getNip05RedisClient and getVanishRequestsRedisClient. We can always get back to it if we ever add more use cases and we don't migrate to the DO db.

count: 1000,
});

let processingPromises = [];
Copy link
Member

Choose a reason for hiding this comment

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

Is this unused?

@dcadenas dcadenas merged commit 8cbcf1f into main Oct 15, 2024
2 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.

2 participants