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
Unknown Object (File)
Mon, Nov 18, 7:48 AM
Unknown Object (File)
Mon, Nov 18, 7:48 AM
Unknown Object (File)
Thu, Nov 14, 9:31 AM
Unknown Object (File)
Thu, Nov 14, 8:54 AM
Unknown Object (File)
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

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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
keyserver/src/socket/redis.js
24–31

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

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)