mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-09 21:10:56 +08:00
Adds a MongoDB broker
* adds mongo broker tests * adds mongo brokers docs * broker info is now cached when it needs to connect to a server, to reduce traffic.
This commit is contained in:
@@ -40,8 +40,10 @@ class Disque(Broker):
|
||||
return len(jobs)
|
||||
|
||||
def info(self):
|
||||
info = self.connection.info('server')
|
||||
return 'Disque {}'.format(info['disque_version'])
|
||||
if not self._info:
|
||||
info = self.connection.info('server')
|
||||
self._info= 'Disque {}'.format(info['disque_version'])
|
||||
return self._info
|
||||
|
||||
@staticmethod
|
||||
def get_connection(list_key=Conf.PREFIX):
|
||||
|
||||
Reference in New Issue
Block a user