Exemplo n.º 1
0
 def get_messages(self, count, block=True, timeout=5, ttl=60, now=None):
     now = assert_now(now)
     response = self._get_messages_raw(count, block=block, timeout=timeout)
     if self._client.backend == "kafka":
         return self._receive_tile_requests_kafka(response, now, ttl)
     elif self._client.backend == "kinesis":
         return self._receive_tile_requests_kinesis(response, now, ttl)
 def get_messages(self, count, block=True, timeout=5, ttl=60, now=None):
     now = assert_now(now)
     response = self._get_messages_raw(count, block=block, timeout=timeout)
     if self._client.backend == "kafka":
         return self._receive_tile_requests_kafka(response, now, ttl)
     elif self._client.backend == "kinesis":
         return self._receive_tile_requests_kinesis(response, now, ttl)
Exemplo n.º 3
0
 def send_tile_requests(self, tilesource, tiles, extension='png', now=None):
     now = assert_now(now)
     messages_encoded = self._codec.encode(tilesource=tilesource,
                                           tiles=tiles,
                                           extension=extension,
                                           now=now)
     return self.send_messages(messages_encoded)
 def send_tile_requests(self, tilesource, tiles, extension='png', now=None):
     now = assert_now(now)
     messages_encoded = self._codec.encode(tilesource=tilesource, tiles=tiles, extension=extension, now=now)
     return self.send_messages(messages_encoded)