123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Collection::View::ChangeStream::Retryable

Relationships & Source Files
Defined in: lib/mongo/collection/view/change_stream/retryable.rb

Overview

Behavior around resuming a change stream.

Since:

  • 2.5.0

Instance Method Summary

Instance Method Details

#read_with_one_retry (private)

Since:

  • 2.5.0

[ GitHub ]

  
# File 'lib/mongo/collection/view/change_stream/retryable.rb', line 30

def read_with_one_retry
  yield
rescue Mongo::Error => e
  if e.change_stream_resumable?
    yield
  else
    raise(e)
  end
end