lib/qu/backend/mongo.rb
# Number of times to retry connection on connection failure (default: 5)
Number of times to retry connection on connection failure (default: 5)
Number of times to retry connection on connection failure ( default : 5 )
def with_connection_retries
        retries = 0
        begin
          yield
        rescue ::Mongo::ConnectionFailure => ex
          retries += 1
          raise ex if retries > max_retries
          sleep retry_frequency * retries
          retry
        end
      end
def with_connection_retries retries = 0 begin yield rescue :: Mongo :: ConnectionFailure => ex retries += 1 raise ex if retries > max_retries sleep retry_frequency * retries retry end end
Number of times to retry connection on connection failure (default: 5)
Number of times to retry connection on connection failure ( default : 5 )