summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2014-01-13 17:57:42 +0000
committerAsk Solem <ask@celeryproject.org>2014-01-13 17:57:42 +0000
commit26bf9faccbcc0bceb97b774e4628ddda5893b6a4 (patch)
treef8633be70593bbc50a9040ea9fcd28d4aac9cbde
parentc9501fe76a1cf119059aaebb2e919609721ca3d1 (diff)
downloadkombu-26bf9faccbcc0bceb97b774e4628ddda5893b6a4.tar.gz
flakesv3.0.9
-rw-r--r--kombu/transport/mongodb.py10
-rw-r--r--kombu/transport/redis.py1
2 files changed, 7 insertions, 4 deletions
diff --git a/kombu/transport/mongodb.py b/kombu/transport/mongodb.py
index 9e0563f2..00eced97 100644
--- a/kombu/transport/mongodb.py
+++ b/kombu/transport/mongodb.py
@@ -121,10 +121,12 @@ class Channel(virtual.Channel):
if dbname in ('/', None):
dbname = 'kombu_default'
- options = {'auto_start_request': True,
- 'ssl': client.ssl,
- 'connectTimeoutMS': int(client.connect_timeout * 1000)
- if client.connect_timeout else None}
+ options = {
+ 'auto_start_request': True,
+ 'ssl': client.ssl,
+ 'connectTimeoutMS': (int(client.connect_timeout * 1000)
+ if client.connect_timeout else None),
+ }
options.update(client.transport_options)
options.update(parsed['options'])
diff --git a/kombu/transport/redis.py b/kombu/transport/redis.py
index 23a53403..7a71ca0b 100644
--- a/kombu/transport/redis.py
+++ b/kombu/transport/redis.py
@@ -97,6 +97,7 @@ def get_redis_error_classes():
class MutexHeld(Exception):
pass
+
@contextmanager
def Mutex(client, name, expire):
lock_id = uuid()