Commit 5917e6e8 authored by Julien Muchembled's avatar Julien Muchembled

admin: factorize code (re)initializing application

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2679 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent d85841ea
......@@ -76,9 +76,12 @@ class Application(object):
self.master_event_handler = MasterEventHandler(self)
self.dispatcher = Dispatcher()
self.cluster_state = None
self.reset()
registerLiveDebugger(on_log=self.log)
def reset(self):
self.master_conn = None
self.master_node = None
registerLiveDebugger(on_log=self.log)
def log(self):
self.em.log()
......
......@@ -115,8 +115,7 @@ class MasterEventHandler(EventHandler):
app = self.app
assert app.master_conn in (conn, None)
app.dispatcher.clear()
app.master_conn = None
app.master_node = None
app.reset()
app.uuid = None
raise PrimaryFailure
......
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