Example #1
0
 def _on_client_state(self, client, adapter_set, state):
     self._state_map[adapter_set] = state
     lightstreamer.dispatch(self._state_funcs, self._state_map)
     if state == lightstreamer.STATE_DISCONNECTED and not self._stopped:
         self.log.error('adapter %r lost connection; reconnecting', adapter_set)
         time.sleep(1)
         self._create_session(client, adapter_set)
Example #2
0
 def _on_update(self, item_ids, row):
     """Invoked when any table has changed; forward the changed row to
     subscribed functions."""
     lightstreamer.dispatch(self.func_map[item_ids], row)
     with self._lock:
         self._maybe_delete(item_ids)