From d23d326560a49e9f59941a0686a10753c66f4581 Mon Sep 17 00:00:00 2001 From: Ian Rodney Date: Tue, 17 Nov 2020 23:44:59 -0800 Subject: [PATCH] [CLI] Fix ray commands when RAY_ADDRESS used (#11989) * [CLI] Fix ray commands when RAY_ADDRESS used * erics suggestion --- python/ray/_private/services.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ray/_private/services.py b/python/ray/_private/services.py index 386ac4efd..c2bcc9aaa 100644 --- a/python/ray/_private/services.py +++ b/python/ray/_private/services.py @@ -170,6 +170,10 @@ def find_redis_address(address=None): The --redis-address here is what is now called the --address, but it appears in the default_worker.py and agent.py calls as --redis-address. """ + + if "RAY_ADDRESS" in os.environ: + return os.environ["RAY_ADDRESS"] + pids = psutil.pids() redis_addresses = set() for pid in pids: