[Neo-report] r2796 jm - /trunk/neo/storage/handlers/replication.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jun 22 17:07:21 CEST 2011
Author: jm
Date: Wed Jun 22 17:07:21 2011
New Revision: 2796
Log:
Do not frighten the user when a connection between 2 replicating nodes is closed
Connection closure is either wanted by the replication node (-> no log)
or not serious (-> warning).
Modified:
trunk/neo/storage/handlers/replication.py
Modified: trunk/neo/storage/handlers/replication.py
==============================================================================
--- trunk/neo/storage/handlers/replication.py [iso-8859-1] (original)
+++ trunk/neo/storage/handlers/replication.py [iso-8859-1] Wed Jun 22 17:07:21 2011
@@ -80,14 +80,15 @@ class ReplicationHandler(EventHandler):
"""This class handles events for replications."""
def connectionLost(self, conn, new_state):
- neo.lib.logging.error(
- 'replication is stopped due to a connection lost')
replicator = self.app.replicator
if replicator.isCurrentConnection(conn):
+ if replicator.pending():
+ neo.lib.logging.warning(
+ 'replication is stopped due to a connection lost')
replicator.storageLost()
def connectionFailed(self, conn):
- neo.lib.logging.error(
+ neo.lib.logging.warning(
'replication is stopped due to connection failure')
self.app.replicator.storageLost()
More information about the Neo-report
mailing list