Exemplo n.º 1
0
 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 []
Exemplo n.º 2
0
 def size(self):
     return redis_size(self.resq, self.kwargs['stat_id'])