Method: Mongo::Cluster#next_primary
- Defined in:
- lib/mongo/cluster.rb
#next_primary(ping = nil, session = nil, timeout: nil) ⇒ Mongo::Server
Get the next primary server we can send an operation to.
788 789 790 791 792 793 794 795 |
# File 'lib/mongo/cluster.rb', line 788 def next_primary(ping = nil, session = nil, timeout: nil) ServerSelector.primary.select_server( self, nil, session, timeout: timeout ) end |