Skip to content

Commit

Permalink
Fix celery#5734 Celery does not consider authMechanism on mongodb bac…
Browse files Browse the repository at this point in the history
…kend URLs
  • Loading branch information
spengjie committed Oct 25, 2019
1 parent ca83e25 commit f36337a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions celery/backends/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f36337a

Please sign in to comment.