def get_recent(self, application_guid): url = '%s/recent?app=%s' % (re.sub(r'^ws', 'http', self.logging_endpoint), application_guid) response = EntityManager._check_response(self.credentials_manager.get(url, stream=True)) boundary = LoggregatorManager._extract_boundary(response) for part in LoggregatorManager._read_multi_part_response(response, boundary): message_read = LogMessage() message_read.ParseFromString(part) yield message_read
def restage(self, application_guid, check_time=0.5, timeout=500): url = '%s%s/%s/restage' % (self.target_endpoint, self.entity_uri, application_guid) response = EntityManager._check_response(self.client.post(url)) _logger.debug('POST - %s - %s', url, response.text) return self._read_response(response)