Class: Telekinesis::Producer::WarnFailureHandler
- Inherits:
-
Object
- Object
- Telekinesis::Producer::WarnFailureHandler
- Defined in:
- lib/telekinesis/producer/warn_failure_handler.rb
Overview
A simple FailureHandler that logs errors with ‘warn`. Available as an example and an easy default.
Instance Method Summary collapse
- #on_kinesis_failure(err, items) ⇒ Object
-
#on_kinesis_retry(err, items) ⇒ Object
Do nothing on retry.
- #on_record_failure(item_err_pairs) ⇒ Object
Instance Method Details
#on_kinesis_failure(err, items) ⇒ Object
13 14 15 16 |
# File 'lib/telekinesis/producer/warn_failure_handler.rb', line 13 def on_kinesis_failure(err, items) warn "PutRecords request with #{items.size} items failed!" warn format_bt(err) end |
#on_kinesis_retry(err, items) ⇒ Object
Do nothing on retry. Let it figure itself out.
11 |
# File 'lib/telekinesis/producer/warn_failure_handler.rb', line 11 def on_kinesis_retry(err, items); end |
#on_record_failure(item_err_pairs) ⇒ Object
6 7 8 |
# File 'lib/telekinesis/producer/warn_failure_handler.rb', line 6 def on_record_failure(item_err_pairs) warn "Puts for #{item_err_pairs.size} records failed!" end |