def stats(self): key = self.key() if key == 'resque': return [ WebContainer(key=k, value=v) for k,v in self.resq.info().items() ] if key == 'redis': return [ WebContainer(key=k, value=v) for k,v in self.resq.redis.info().iteritems() ] if key == 'keys': return [ WebContainer(key=k, type=self.resq.redis.type('resque:'+k), size=redis_size(self.resq, k)) for k in self.resq.keys() ] return []
def size(self): return redis_size(self.resq, self.kwargs['stat_id'])