def refresh(self):
    try:
        r = self.unis.get(('/services/' + self.config['id']))
        if (not r):
            logger.warn('refresh', msg='refresh failed')
            logger.warn('refresh', msg='re-enable service')
            self._setup_service()
        else:
            self.config = r
            if (((time.time() * 1000000.0) + (int(self.config['properties']['configurations']['unis_poll_interval']) * 1000000.0)) > (self.config['ts'] + (self.config['ttl'] * 1000000.0))):
                self._setup_service()
        self.exponential_backoff = int(self.config['properties']['configurations']['unis_poll_interval'])
        return self.exponential_backoff
    except ConnectionError:
        self.exponential_backoff = (self.exponential_backoff * 2)
        return self.exponential_backoff
def refresh(self):
    try:
        r = self.unis.get(('/services/' + self.config['id']))
        if (not r):
            logger.warn('refresh', msg='refresh failed')
            logger.warn('refresh', msg='re-enable service')
            self._setup_service()
        else:
            self.config = r
            if (((time.time() * 1000000.0) + (int(self.config['properties']['configurations']['unis_poll_interval']) * 1000000.0)) > (self.config['ts'] + (self.config['ttl'] * 1000000.0))):
                self._setup_service()
        self.exponential_backoff = int(self.config['properties']['configurations']['unis_poll_interval'])
        return self.exponential_backoff
    except ConnectionError:
        self.exponential_backoff = (self.exponential_backoff * 2)
        return self.exponential_backoff