Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
concretevitamin committed May 23, 2018
1 parent 13f0d3a commit 0a79cca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions python/ray/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def _start_redis_instance(node_ip_address="127.0.0.1",
stderr_file=None,
cleanup=True,
executable=REDIS_EXECUTABLE,
modules=[REDIS_MODULE]):
modules=None):
"""Start a single Redis server.
Args:
Expand All @@ -561,7 +561,8 @@ def _start_redis_instance(node_ip_address="127.0.0.1",
Python process that imported services exits.
executable (str): Full path tho the redis-server executable.
modules (list of str): A list of pathnames, pointing to the redis
module(s) that will be loaded in this redis server.
module(s) that will be loaded in this redis server. If None, load
the default Ray redis module.
Returns:
A tuple of the port used by Redis and a handle to the process that was
Expand All @@ -572,6 +573,8 @@ def _start_redis_instance(node_ip_address="127.0.0.1",
Exception: An exception is raised if Redis could not be started.
"""
assert os.path.isfile(executable)
if modules is None:
modules = [REDIS_MODULE]
for module in modules:
assert os.path.isfile(module)
counter = 0
Expand Down Expand Up @@ -601,7 +604,8 @@ def _start_redis_instance(node_ip_address="127.0.0.1",
port = new_port()
counter += 1
if counter == num_retries:
raise Exception("Couldn't start Redis.")
raise Exception("Couldn't start Redis. Check stderr file " +
stderr_file)

# Create a Redis client just for configuring Redis.
redis_client = redis.StrictRedis(host="127.0.0.1", port=port)
Expand Down
2 changes: 1 addition & 1 deletion src/ray/gcs/client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace ray {
namespace gcs {

namespace {
const char *const kRandomId = "abcdefghijklmnopqrst";
constexpr char kRandomId[] = "abcdefghijklmnopqrst";
} // namespace

/* Flush redis. */
Expand Down

0 comments on commit 0a79cca

Please sign in to comment.