Permalink
Browse files

Avoid getting stuck on larger community launches

  • Loading branch information...
1 parent b600bc3 commit 20f4c7553e224ecbd784b0d12319e27e08d372c1 @joaquincasares joaquincasares committed Mar 4, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 ds4_motd.py
View
@@ -110,6 +110,9 @@ def waiting_for_nodetool():
retcode = 0
while True:
+ if conf.get_config('Cassandra', 'partitioner') == 'murmur':
+ config_data['nodetool_statement'] = 'nodetool status'
+
retcode = subprocess.call(shlex.split(config_data['nodetool_statement']), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if (int(retcode) != 3):
break
@@ -138,8 +141,6 @@ def waiting_for_full_cluster_to_launch(nodetool_out):
if time.time() - start_time > 60:
break
- if conf.get_config('Cassandra', 'partitioner') == 'murmur':
- config_data['nodetool_statement'] = 'nodetool status'
nodetool_out = subprocess.Popen(shlex.split(config_data['nodetool_statement']), stderr=subprocess.PIPE, stdout=subprocess.PIPE).stdout.read()
print nodetool_out

0 comments on commit 20f4c75

Please sign in to comment.