-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
ecommerce/infra/lib/infra/event_store.rb
Lines 4 to 23 in af5bbf1
| require_relative "../../../rails_application/lib/transformations/refund_to_return_event_mapper" rescue nil | |
| begin | |
| mapper = RubyEventStore::Mappers::PipelineMapper.new( | |
| RubyEventStore::Mappers::Pipeline.new( | |
| preserve_types, | |
| Transformations::RefundToReturnEventMapper.new( | |
| 'Ordering::DraftRefundCreated' => 'Ordering::DraftReturnCreated', | |
| 'Ordering::ItemAddedToRefund' => 'Ordering::ItemAddedToReturn', | |
| 'Ordering::ItemRemovedFromRefund' => 'Ordering::ItemRemovedFromReturn' | |
| ), | |
| RubyEventStore::Mappers::Transformation::SymbolizeMetadataKeys.new, | |
| to_domain_event: RubyEventStore::Mappers::Transformation::DomainEvent.new | |
| ) | |
| ) | |
| client = RailsEventStore::JSONClient.new(mapper: mapper) | |
| rescue => e | |
| puts "Mapper creation failed: #{e.message}" | |
| client = RailsEventStore::JSONClient.new | |
| end |
now it's part of infra which is supposed to be independent of specific apps
Metadata
Metadata
Assignees
Labels
No labels