Method: Mongo::Retryable#select_server
- Defined in:
- lib/mongo/retryable.rb
#select_server(cluster, server_selector, session, failed_server = nil, timeout: nil) ⇒ Mongo::Server
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This is a separate method to make it possible for the test suite to assert that server selection is performed during retry attempts.
This is a public method so that it can be accessed via the read and write worker delegates, as needed.
49 50 51 52 53 54 55 56 57 |
# File 'lib/mongo/retryable.rb', line 49 def select_server(cluster, server_selector, session, failed_server = nil, timeout: nil) server_selector.select_server( cluster, nil, session, deprioritized: [failed_server].compact, timeout: timeout ) end |