Skip to content

Commit

Permalink
change read preference to secondary only
Browse files Browse the repository at this point in the history
  • Loading branch information
yuema137 committed Jun 7, 2024
1 parent 22e8f0f commit fa033b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilix/rundb.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def pymongo_collection(collection='runs', **kwargs):
if not database:
database = uconfig.get('RunDB', 'pymongo_database')
uri = uri.format(user=user, pw=pw, url=url)
c = pymongo.MongoClient(uri, readPreference='secondaryPreferred')
c = pymongo.MongoClient(uri, readPreference='secondary')
DB = c[database]
coll = DB[collection]
# Checkout the collection we are returning and raise errors if you want
Expand Down

0 comments on commit fa033b3

Please sign in to comment.