Beispiel #1
0
 def __init__(self, ip_address="127.0.0.1", port=2113):
     self._base_url = "http://{0}:{1}".format(ip_address, str(port))
     self._headers = {
         "content-type": "application/json",
         "accept": "application/json",
         "extensions": "json"
     }
     self._read_batch_size = 20
     self._tornado_http_sender = TornadoHttpSender()
     self._subscribers = []
     self._subscribers_thread = thread.start_new_thread(
         self._handle_subscribers, ())
     self._subscribers_all_thread = thread.start_new_thread(
         self._handle_subscribers_all, ())
     self._should_subscribe_all = False
     self.projections = Projections(ip_address, port)