diff --git a/lib/benchmark/append_non_conflicting_tags.rb b/lib/benchmark/append_non_conflicting_tags.rb index a8c80de..074c9ca 100644 --- a/lib/benchmark/append_non_conflicting_tags.rb +++ b/lib/benchmark/append_non_conflicting_tags.rb @@ -28,7 +28,7 @@ module En57 case @event_store.append(events, fail_if: scope.after(position)) in Success break - in Failure(position:) + in Failure[position:] retries.call end end diff --git a/lib/benchmark/concurrent_append_conflicting_tags.rb b/lib/benchmark/concurrent_append_conflicting_tags.rb index 25f4077..80d50bd 100644 --- a/lib/benchmark/concurrent_append_conflicting_tags.rb +++ b/lib/benchmark/concurrent_append_conflicting_tags.rb @@ -29,7 +29,7 @@ module En57 case @event_store.append(events, fail_if: scope.after(position)) in Success break - in Failure(position:) + in Failure[position:] retries.call end end diff --git a/lib/en57/repository.rb b/lib/en57/repository.rb index 323da9a..bddd3f5 100644 --- a/lib/en57/repository.rb +++ b/lib/en57/repository.rb @@ -56,9 +56,13 @@ module En57 case row.first.fetch("status") when "success" - Success.new(position: row.first.fetch("position").then { Integer(it) }) + Success.new( + position: row.first.fetch("position").then { Integer(it) }, + ) when "append_condition_violated" - Failure.new(position: row.first.fetch("position").then { Integer(it) }) + Failure.new( + position: row.first.fetch("position").then { Integer(it) }, + ) end rescue @adapter.serialization_error if attempts_remaining.positive?