Exemplo n.º 1
0
Arquivo: engine.py Projeto: happz/hlib
  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()
Exemplo n.º 2
0
Arquivo: engine.py Projeto: happz/hlib
  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
Exemplo n.º 3
0
Arquivo: env.py Projeto: happz/hlib
  def quit(self):
    for server in self.engine.servers:
      server.stop()

    hlib.event.trigger('engine.Halted', None)