Skip to content

Commit

Permalink
Manual pick of fix for #2580 into 3.1 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Apr 22, 2015
1 parent 951c237 commit 8572bee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions celery/backends/mongodb.py
Expand Up @@ -92,8 +92,11 @@ def __init__(self, app=None, url=None, **kwargs):
self.options = dict(config, **config.pop('options', None) or {})

# Set option defaults
self.options.setdefault('max_pool_size', self.max_pool_size)
self.options.setdefault('auto_start_request', False)
if pymongo.version_tuple >= (3, ):
self.options.setdefault('maxPoolSize', self.max_pool_size)
else:
self.options.setdefault('max_pool_size', self.max_pool_size)
self.options.setdefault('auto_start_request', False)

self.url = url
if self.url:
Expand Down

0 comments on commit 8572bee

Please sign in to comment.