Page MenuHomePhabricator

[keyserver] Make it possible to configure Redis host
ClosedPublic

Authored by ashoat on Apr 25 2022, 7:49 PM.
Tags
None
Referenced Files
F3242434: D3850.diff
Wed, Nov 13, 9:45 PM
Unknown Object (File)
Sat, Nov 9, 10:48 PM
Unknown Object (File)
Wed, Nov 6, 11:41 AM
Unknown Object (File)
Tue, Nov 5, 3:43 AM
Unknown Object (File)
Oct 8 2024, 1:26 AM
Unknown Object (File)
Oct 8 2024, 1:26 AM
Unknown Object (File)
Oct 8 2024, 1:26 AM
Unknown Object (File)
Oct 8 2024, 1:22 AM

Details

Summary

Today we always hit localhost. I'm working on Dockerizing the keyserver, and since we're using docker-compose we will need to allow this to be configurable.

Depends on D3849

Test Plan

in concert with D3851, I tested that yarn update-geoip worked inside the Docker image (it accesses Redis, admittedly for no good reason)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
keyserver/src/socket/redis.js
24–31 ↗(On Diff #11900)

What is the reason for using immediately invoked function?

This revision is now accepted and ready to land.Apr 26 2022, 9:46 AM
keyserver/src/socket/redis.js
24–31 ↗(On Diff #11900)

Using a ternary like you suggested would break my third rule of ternary conditionals:

  1. Avoid ternary conditionals that don’t format cleanly Ternary conditionals should be obvious at-a-glance. Either the whole expression should fit on one line, or the ? and : characters should appear at the start of subsequent lines.

I could've alternately used a let declaration, but I prefer to avoid those since I think it's harder to tell what the variable's value will be (you have to search to see if it's reassigned anywhere)