YUKI Hiroshi
null+****@clear*****
Mon Mar 23 11:38:17 JST 2015
YUKI Hiroshi 2015-03-23 11:38:17 +0900 (Mon, 23 Mar 2015) New Revision: eaa2231f1a36e03d3874793c328ef0fb233e759b https://github.com/droonga/droonga-engine/commit/eaa2231f1a36e03d3874793c328ef0fb233e759b Message: Define method to wait until the target node is restarted Modified files: bin/droonga-engine-join Modified: bin/droonga-engine-join (+6 -1) =================================================================== --- bin/droonga-engine-join 2015-03-20 16:46:10 +0900 (3ad0595) +++ bin/droonga-engine-join 2015-03-23 11:38:17 +0900 (da734b9) @@ -45,7 +45,7 @@ class JoinCommand set_node_role update_existing_nodes do_join - sleep(5) #TODO: wait for restarting of the joining node. this should be done more safely. + wait_until_restarted(joining_node, source_node) monitor_copying_state unless @options["no-copy"] set_effective_message_timestamp reset_node_role @@ -252,6 +252,11 @@ class JoinCommand #XXX we have to write more codes to cancel remote processes! reset_node_role if @node_role_changed end + + def wait_until_restarted(*nodes) + #TODO: wait for restarting of the given nodes. this should be done more safely. + sleep(5) + end end JoinCommand.new.run -------------- next part -------------- HTML����������������������������... Download