Exemplo n.º 1
0
 def on_open(self, info):
     """Register new handler with MessageNotifier."""
     StatusConnection.CLIENTS.register(self)
     with session_scope() as session:
         latest = query.get_latest_data(session)
     self.send(latest)
     LOG.debug('Registered client')
Exemplo n.º 2
0
 def open(self):
     """Register new handler with MessageNotifier."""
     StatusHandler.CLIENTS.register(self)
     with session_scope() as session:
         latest = query.get_latest_data(session)
     self.write_message(latest)
     LOG.debug('Registered client')
Exemplo n.º 3
0
 def on_open(self, info):
     """Register new handler with MessageNotifier."""
     StatusConnection.CLIENTS.register(self)
     with session_scope() as session:
         latest = query.get_latest_data(session)
     self.send(latest)
     LOG.debug('Registered client')
Exemplo n.º 4
0
 def get(self):
     with session_scope() as session:
         self.write(query.get_latest_data(session))
     self.finish()