Method: Mongo::Cluster#heartbeat_interval

Defined in:
lib/mongo/cluster.rb

#heartbeat_intervalFloat

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.

Get the refresh interval for the server. This will be defined via an option or will default to 10.

Returns:

  • (Float)

    The heartbeat interval, in seconds.

Since:

  • 2.10.0



408
409
410
# File 'lib/mongo/cluster.rb', line 408

def heartbeat_interval
  options[:heartbeat_frequency] || Server::Monitor::DEFAULT_HEARTBEAT_INTERVAL
end