-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-3445 Improve documentation for custom readPreference tags #1068
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
Conversation
This PR also addresses the link failures in PYTHON-3455 |
README.rst
Outdated
@@ -25,7 +25,7 @@ For issues with, questions about, or feedback for PyMongo, please look into | |||
our `support channels <https://support.mongodb.com/welcome>`_. Please | |||
do not email any of the PyMongo developers directly with issues or | |||
questions - you're more likely to get an answer on the `MongoDB Community | |||
Forums <https://developer.mongodb.com/community/forums/tag/python-driver>`_. | |||
Forums <https://www.`mongodb.com/community/forums/`tag/python>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two stray backticks in the link
pymongo/read_preferences.py
Outdated
|
||
Nearest(tag_sets=[ | ||
{"node":"analytics"} | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this one line like below: Nearest(tag_sets=[{"node":"analytics"}])
Can you also add a similar SecondaryPreferred example?
pymongo/read_preferences.py
Outdated
Nearest(tag_sets=[{"node":"analytics"}]) | ||
|
||
This can also be done using SecondaryPreferred to ensure that | ||
the queries are sent to secondary nodes:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry "to ensure that the queries are sent to secondary nodes" is a little misleading since that's not the behavior of SecondaryPreferred, How about just:
For example, to only send a query to an analytic node::
Nearest(tag_sets=[{"node":"analytics"}])
Or using :class:`SecondaryPreferred`::
SecondaryPreferred(tag_sets=[{"node":"analytics"}])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
No description provided.