lib/onstomp/failover/buffers/written.rb in onstomp-1.0.0 vs lib/onstomp/failover/buffers/written.rb in onstomp-1.0.1
- old
+ new
@@ -8,11 +8,11 @@
def initialize failover
@failover = failover
@buffer_mutex = Mutex.new
@buffer = []
@txs = {}
-
+
failover.before_send &method(:buffer_frame)
failover.before_commit &method(:buffer_frame)
failover.before_abort &method(:buffer_frame)
failover.before_subscribe &method(:buffer_frame)
failover.before_begin &method(:buffer_transaction)
@@ -76,10 +76,10 @@
@buffer_mutex.synchronize { @buffer.delete f }
end
end
# Called when the {OnStomp::Failover::Client failover} client triggers
- # +on_failover_connected+ to start replaying any frames in the buffer.
+ # `on_failover_connected` to start replaying any frames in the buffer.
def replay fail, client, *_
replay_frames = @buffer_mutex.synchronize do
@buffer.select { |f| f[:'x-onstomp-failover-replay'] = '1'; true }
end