Sha256: cc985cd2da3dbb464691dd9b5be4cc2d23e14343c4a4c32971bac5a445054f23
Contents?: true
Size: 621 Bytes
Versions: 9
Compression:
Stored size: 621 Bytes
Contents
module PhobosDBCheckpoint class RetryFailure include PhobosDBCheckpoint::Handler def initialize(failure) @failure = failure @action_taken = nil end def perform self .class .around_consume(payload, metadata) do @action_taken = handler.consume(payload, metadata) end @failure.destroy @action_taken end private def payload @failure.payload.to_json end def metadata @failure.metadata.merge(retry_count: 0) end def handler @failure .configured_handler .new end end end
Version data entries
9 entries across 9 versions & 1 rubygems