[CLI] Fix ray commands when RAY_ADDRESS used (#11989)

* [CLI] Fix ray commands when RAY_ADDRESS used

* erics suggestion
This commit is contained in:
Ian Rodney 2020-11-17 23:44:59 -08:00 committed by GitHub
parent d87af0da88
commit d23d326560
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: