Fix error in MonitorHandler recovering a saved Session across a reload. This probably affected the TickerHandler as well. Add a new hook to the server object that gets called once the portal has synced, and run the monitorhandler/tickerhandler restores there. Also some changes to the serialization of Sessions. Resolves #1164.
This commit is contained in:
parent
b46bc9b2aa
commit
052e1845a2
6 changed files with 70 additions and 34 deletions
|
|
@ -327,14 +327,12 @@ class ServerSessionHandler(SessionHandler):
|
|||
self[sessid] = sess
|
||||
sess.at_sync()
|
||||
|
||||
# after sync is complete we force-validate all scripts
|
||||
# (this also starts them)
|
||||
init_mode = _ServerConfig.objects.conf("server_restart_mode", default=None)
|
||||
_ScriptDB.objects.validate(init_mode=init_mode)
|
||||
_ServerConfig.objects.conf("server_restart_mode", delete=True)
|
||||
# tell the server hook we synced
|
||||
self.server.at_post_portal_sync()
|
||||
# announce the reconnection
|
||||
self.announce_all(_(" ... Server restarted."))
|
||||
|
||||
|
||||
def portal_disconnect(self, session):
|
||||
"""
|
||||
Called from Portal when Portal session closed from the portal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue