Skip to content

enabled lazy connect with multiprocessing #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions flask_mongoengine/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def _resolve_settings(conn_setting, removePass=True):
port = conn_setting.get('port', 27017)
username = conn_setting.get('username', None)
password = conn_setting.get('password', None)
connect = conn_setting.get('connect', True)
# Default to ReadPreference.PRIMARY if no read_preference is supplied
read_preference = conn_setting.get('read_preference', ReadPreference.PRIMARY)

Expand All @@ -262,6 +263,7 @@ def _resolve_settings(conn_setting, removePass=True):
resolved['password'] = password
resolved['port'] = port
resolved['username'] = username
resolved['connect'] = connect
replica_set = conn_setting.pop('replicaset', None)
if replica_set:
resolved['replicaSet'] = replica_set
Expand Down