Add server restart messaging also when restarting server from the shell.

This commit is contained in:
Griatch 2017-01-29 14:46:38 +01:00
parent 33e1d03077
commit cdaa137868
2 changed files with 2 additions and 1 deletions

View file

@ -56,7 +56,7 @@ class CmdReload(COMMAND_DEFAULT_CLASS):
reason = ""
if self.args:
reason = "(Reason: %s) " % self.args.rstrip(".")
SESSIONS.announce_all(" Server restarting %s..." % reason)
SESSIONS.announce_all(" Server restart initiated %s..." % reason)
SESSIONS.server.shutdown(mode='reload')

View file

@ -174,6 +174,7 @@ class AmpClientFactory(protocol.ReconnectingClientFactory):
"""
if hasattr(self, "server_restart_mode"):
self.portal.sessions.announce_all(" Server restarting ...")
self.maxDelay = 2
else:
# Don't translate this; avoid loading django on portal side.