mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-10 09:30:56 +08:00
adds info method to brokers
This commit is contained in:
@@ -34,6 +34,10 @@ class Redis(Broker):
|
||||
logger.error('Can not connect to Redis server.')
|
||||
raise e
|
||||
|
||||
def info(self):
|
||||
info = self.connection.info('server')
|
||||
return 'Redis {}'.format(info['redis_version'])
|
||||
|
||||
def set_stat(self, key, value, timeout):
|
||||
self.connection.set(key, value, timeout)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user