[Neo-report] r1800 gregory - /trunk/neo/master/app.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 19 09:46:54 CET 2010
Author: gregory
Date: Fri Feb 19 09:46:53 2010
New Revision: 1800
Log:
Don't start an election if there is no other masters.
Modified:
trunk/neo/master/app.py
Modified: trunk/neo/master/app.py
==============================================================================
--- trunk/neo/master/app.py [iso-8859-1] (original)
+++ trunk/neo/master/app.py [iso-8859-1] Fri Feb 19 09:46:53 2010
@@ -101,8 +101,10 @@
# Start a normal operation.
while True:
# (Re)elect a new primary master.
- self.electPrimary(bootstrap=bootstrap)
- bootstrap = False
+ self.primary = not bool(self.nm.getMasterList())
+ if not self.primary:
+ self.electPrimary(bootstrap=bootstrap)
+ bootstrap = False
try:
if self.primary:
self.playPrimaryRole()
More information about the Neo-report
mailing list