diff --git a/celery/backends/mongodb.py b/celery/backends/mongodb.py index dd698007241..8d551bca802 100644 --- a/celery/backends/mongodb.py +++ b/celery/backends/mongodb.py @@ -157,6 +157,10 @@ def _get_connection(self): # don't change self.options conf = dict(self.options) conf['host'] = host + if self.user: + conf['username'] = self.user + if self.password: + conf['password'] = self.password self._connection = MongoClient(**conf)