'Moved from nova.utils
Check whether a service is up based on last heartbeat.'

def is_up(self, service_ref):

    key = ('%(topic)s:%(host)s' % service_ref)
    is_up = (self.mc.get(str(key)) is not None)
    if (not is_up):
        LOG.debug('Seems    service    %s    is    down', key)
    return is_up
