コード例 #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)
コード例 #2
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)
コード例 #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)
コード例 #4
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)