Module: Vessel::Cargo::Callbacks
- Included in:
- Vessel::Cargo
- Defined in:
- lib/vessel/cargo/callbacks.rb
Constant Summary collapse
- INFO_INTERVAL =
4
Instance Method Summary collapse
- #after(_stats) ⇒ Object
- #after_change(_counter, _stats) ⇒ Object
- #before(_stats) ⇒ Object
- #before_start ⇒ Object
- #before_stop ⇒ Object
- #info(stats) ⇒ Object
- #on_error(_request, error) ⇒ Object
Instance Method Details
#after(_stats) ⇒ Object
18 |
# File 'lib/vessel/cargo/callbacks.rb', line 18 def after(_stats); end |
#after_change(_counter, _stats) ⇒ Object
12 |
# File 'lib/vessel/cargo/callbacks.rb', line 12 def after_change(_counter, _stats); end |
#before(_stats) ⇒ Object
10 |
# File 'lib/vessel/cargo/callbacks.rb', line 10 def before(_stats); end |
#before_start ⇒ Object
8 |
# File 'lib/vessel/cargo/callbacks.rb', line 8 def before_start; end |
#before_stop ⇒ Object
20 |
# File 'lib/vessel/cargo/callbacks.rb', line 20 def before_stop; end |
#info(stats) ⇒ Object
14 15 16 |
# File 'lib/vessel/cargo/callbacks.rb', line 14 def info(stats) Vessel::Logger.info "Cargo: #{stats.map { |k, v| "#{k}=#{v}" }.join(', ')}" end |
#on_error(_request, error) ⇒ Object
22 23 24 |
# File 'lib/vessel/cargo/callbacks.rb', line 22 def on_error(_request, error) raise error end |