Add Redis port option to startup script (#232)

* specify redis address when starting head

* cleanup

* update starting cluster documentation

* Whitespace.

* Address Philipp's comments.

* Change redis_host -> redis_ip_address.
This commit is contained in:
Johann Schleier-Smith
2017-01-31 00:28:00 -08:00
committed by Robert Nishihara
parent db7297865f
commit 6ad2b5d87a
7 changed files with 96 additions and 57 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ def key_to_hex_identifiers(key):
async def hello(websocket, path):
conn = await aioredis.create_connection((redis_host, redis_port), loop=loop)
conn = await aioredis.create_connection((redis_ip_address, redis_port), loop=loop)
while True:
command = json.loads(await websocket.recv())
@@ -107,7 +107,7 @@ async def hello(websocket, path):
if __name__ == "__main__":
args = parser.parse_args()
redis_address = args.redis_address.split(":")
redis_host, redis_port = redis_address[0], int(redis_address[1])
redis_ip_address, redis_port = redis_address[0], int(redis_address[1])
start_server = websockets.serve(hello, "localhost", args.port)