-
Notifications
You must be signed in to change notification settings - Fork 0
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
Vanish requests #29
Conversation
There was a problem hiding this 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!
src/getRedisClient.js
Outdated
@@ -25,11 +25,33 @@ async function initializeRedis() { | |||
} | |||
} | |||
|
|||
async function getRedisClient() { | |||
async function initializeRemoteRedis() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/nameRecordRepository.js
Outdated
count: 1000, | ||
}); | ||
|
||
let processingPromises = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this unused?
Adds a
vanish_requests
stream subscription to remove info for specific pubkeys. This is for https://github.com/planetary-social/infrastructure/issues/139