Module: OplogEventHandler
- Defined in:
- lib/oplog_event_handler.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- OPERATIONS =
{ 'i' => :insert, 'u' => :update, 'd' => :delete, 'c' => :dbcmd, 'n' => :noop }
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/oplog_event_handler.rb', line 4 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#run ⇒ Object
63 64 65 66 67 68 69 70 |
# File 'lib/oplog_event_handler.rb', line 63 def run() tail do |log| callbacks = get_callbaks(log) unless callbacks.empty? send_events(log, callbacks) end end end |