def stop(self): for server in self.servers: server.stop() hlib.events.trigger('engine.Halted', None, engine = self) for hook in self.hooks.values(): hook.unregister() self.quit_event.set()
def on_system_reload(self, _): for server in self.servers: server.stop() for app in self.apps.values(): app.channels.close() if not app.db: continue app.db.close() app.db = None
def quit(self): for server in self.engine.servers: server.stop() hlib.event.trigger('engine.Halted', None)