Commit c791f6d1 authored by Aurel's avatar Aurel

comsetic changes


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@706 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent de2dfaa0
......@@ -194,6 +194,5 @@ class Application(object):
p = protocot.protocolError('invalid partition table offset')
conn.notify(p)
return
print "sending packet", len(row_list)
p = protocol.answerPartitionList(self.ptid, row_list)
conn.notify(p, msg_id)
......@@ -125,6 +125,7 @@ class MasterEventHandler(BaseEventHandler):
# monitoring phase
self.app.monitoring_handler.dispatch(conn, packet)
class MasterBaseEventHandler(BaseEventHandler):
""" This is the base class for connection to primary master node"""
......@@ -132,7 +133,6 @@ class MasterBaseEventHandler(BaseEventHandler):
"""Called when a connection is accepted."""
raise UnexpectedPacketError
def connectionCompleted(self, conn):
app = self.app
if app.trying_master_node is None:
......@@ -143,7 +143,6 @@ class MasterBaseEventHandler(BaseEventHandler):
conn.ask(protocol.askPrimaryMaster())
EventHandler.connectionCompleted(self, conn)
def connectionFailed(self, conn):
app = self.app
......@@ -163,7 +162,6 @@ class MasterBaseEventHandler(BaseEventHandler):
EventHandler.connectionFailed(self, conn)
def timeoutExpired(self, conn):
app = self.app
......@@ -178,7 +176,6 @@ class MasterBaseEventHandler(BaseEventHandler):
EventHandler.timeoutExpired(self, conn)
def connectionClosed(self, conn):
app = self.app
......@@ -208,10 +205,8 @@ class MasterBaseEventHandler(BaseEventHandler):
EventHandler.peerBroken(self, conn)
@decorators.identification_required
def handleNotifyNodeInformation(self, conn, packet, node_list):
logging.info("handleNotifyNodeInformation")
uuid = conn.getUUID()
app = self.app
nm = app.nm
......@@ -303,10 +298,10 @@ class MasterRequestEventHandler(MasterBaseEventHandler):
p = protocol.noError(msg)
client_conn.notify(p, kw['msg_id'])
class MasterBootstrapEventHandler(MasterBaseEventHandler):
"""This class manage the bootstrap part to the primary master node"""
def handleNotReady(self, conn, packet, message):
app = self.app
if app.trying_master_node is not None:
......@@ -418,7 +413,6 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler):
@decorators.identification_required
def handleNotifyPartitionChanges(self, conn, packet, ptid, cell_list):
logging.warning("handleNotifyPartitionChanges")
app = self.app
nm = app.nm
pt = app.pt
......@@ -447,7 +441,6 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler):
@decorators.identification_required
def handleSendPartitionTable(self, conn, packet, ptid, row_list):
logging.warning("handleSendPartitionTable")
uuid = conn.getUUID()
app = self.app
nm = app.nm
......@@ -470,6 +463,3 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler):
pt.setCell(offset, node, state)
pt.log()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment