Method: Mongo::Collection::View::Readable#timeout_ms

Defined in:
lib/mongo/collection/view/readable.rb

#timeout_ms(timeout_ms = nil) ⇒ Integer, View

The per-operation timeout in milliseconds. Must a positive integer.

Parameters:

  • timeout_ms (Integer) (defaults to: nil)

    Timeout value.

Returns:

  • (Integer, View)

    Either the timeout_ms value or a new View.

Since:

  • 2.0.0



669
670
671
# File 'lib/mongo/collection/view/readable.rb', line 669

def timeout_ms(timeout_ms = nil)
  configure(:timeout_ms, timeout_ms)
end