Exception: Wurk::Client::Buffered::Overflow

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/wurk/client/buffered.rb

Overview

Raised when the cap would be exceeded under overflow_mode == :raise. Inherits from RuntimeError so callers can rescue narrowly. Carries EVERY payload the call failed to deliver — the tail that did not fit, plus, on a mixed push, the batched payloads that never buffer — so a caller can persist/log/forward the lot. cause is the connection error that sent the push to the buffer in the first place.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payloads) ⇒ Overflow

Returns a new instance of Overflow.



33
34
35
36
37
# File 'lib/wurk/client/buffered.rb', line 33

def initialize(payloads)
  @payloads = payloads
  super("reliable_push buffer is full (cap=#{Buffered.buffer_cap}), " \
        "#{payloads.size} payload(s) undelivered")
end

Instance Attribute Details

#payloadsObject (readonly)

Returns the value of attribute payloads.



31
32
33
# File 'lib/wurk/client/buffered.rb', line 31

def payloads
  @payloads
end