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:
Ilan Steemers
2015-09-25 20:03:39 +02:00
parent ef6a60478a
commit 826178c463
11 changed files with 188 additions and 11 deletions
+4 -2
View File
@@ -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):