Changed the order of Portal/Server shutdown to make sure the Portal stops correctly in light of the changes to the shutdown protocol from previous revision.
This commit is contained in:
parent
33154d4d60
commit
b7872f2d6f
2 changed files with 2 additions and 2 deletions
|
|
@ -118,8 +118,8 @@ class CmdShutdown(MuxCommand):
|
||||||
announcement += "%s\n" % self.args
|
announcement += "%s\n" % self.args
|
||||||
logger.log_infomsg('Server shutdown by %s.' % self.caller.name)
|
logger.log_infomsg('Server shutdown by %s.' % self.caller.name)
|
||||||
SESSIONS.announce_all(announcement)
|
SESSIONS.announce_all(announcement)
|
||||||
SESSIONS.portal_shutdown()
|
|
||||||
SESSIONS.server.shutdown(mode='shutdown')
|
SESSIONS.server.shutdown(mode='shutdown')
|
||||||
|
SESSIONS.portal_shutdown()
|
||||||
|
|
||||||
|
|
||||||
class CmdPy(MuxCommand):
|
class CmdPy(MuxCommand):
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,6 @@ class Evennia(object):
|
||||||
from evennia.server.oobhandler import OOB_HANDLER
|
from evennia.server.oobhandler import OOB_HANDLER
|
||||||
OOB_HANDLER.save()
|
OOB_HANDLER.save()
|
||||||
else:
|
else:
|
||||||
ServerConfig.objects.conf("server_restart_mode", "reset")
|
|
||||||
if mode == 'reset':
|
if mode == 'reset':
|
||||||
# like shutdown but don't unset the is_connected flag and don't disconnect sessions
|
# like shutdown but don't unset the is_connected flag and don't disconnect sessions
|
||||||
yield [o.at_server_shutdown() for o in ObjectDB.get_all_cached_instances()]
|
yield [o.at_server_shutdown() for o in ObjectDB.get_all_cached_instances()]
|
||||||
|
|
@ -368,6 +367,7 @@ class Evennia(object):
|
||||||
for p in PlayerDB.get_all_cached_instances()]
|
for p in PlayerDB.get_all_cached_instances()]
|
||||||
yield ObjectDB.objects.clear_all_sessids()
|
yield ObjectDB.objects.clear_all_sessids()
|
||||||
yield [(s.pause(), s.at_server_reload()) for s in ScriptDB.get_all_cached_instances()]
|
yield [(s.pause(), s.at_server_reload()) for s in ScriptDB.get_all_cached_instances()]
|
||||||
|
ServerConfig.objects.conf("server_restart_mode", "reset")
|
||||||
self.at_server_cold_stop()
|
self.at_server_cold_stop()
|
||||||
|
|
||||||
# tickerhandler state should always be saved.
|
# tickerhandler state should always be saved.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue