Skip to content
Snippets Groups Projects
Commit 43688cb8 authored by Nathaniel Kofalt's avatar Nathaniel Kofalt
Browse files

Merge pull request #124 from scitran/issue_123

Resolve "No replica set members found yet" errors when using mongodb …
parents b3405989 276eda90
No related branches found
No related tags found
No related merge requests found
...@@ -75,9 +75,10 @@ if not os.path.exists(__config['persistent']['data_path']): ...@@ -75,9 +75,10 @@ if not os.path.exists(__config['persistent']['data_path']):
db = pymongo.MongoClient( db = pymongo.MongoClient(
__config['persistent']['db_uri'], __config['persistent']['db_uri'],
j=True, j=True, # Requests only return once write has hit the DB journal
connectTimeoutMS=__config['persistent']['db_connect_timeout'], connectTimeoutMS=__config['persistent']['db_connect_timeout'],
serverSelectionTimeoutMS=__config['persistent']['db_server_selection_timeout'] serverSelectionTimeoutMS=__config['persistent']['db_server_selection_timeout'],
connect=False, # Connect on first operation to avoid multi-threading related errors
).get_default_database() ).get_default_database()
log.debug(str(db)) log.debug(str(db))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment