Method: MoSQL::Streamer#optail

Defined in:
lib/mosql/streamer.rb

#optailObject



168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/mosql/streamer.rb', line 168

def optail
  tail_from = options[:tail_from]
  if tail_from.is_a? Time
    tail_from = tailer.most_recent_position(tail_from)
  end
  tailer.tail(:from => tail_from, :filter => options[:oplog_filter])
  until @done
    tailer.stream(1000) do |op|
      handle_op(op)
    end
  end
end