lib/dirty_pipeline/storage.rb in dirty_pipeline-0.6.4 vs lib/dirty_pipeline/storage.rb in dirty_pipeline-0.7.0

- old
+ new

@@ -45,13 +45,13 @@ def status store["status"] end def commit!(event) - store["status"] = event.destination if event.destination - store["state"].merge!(event.changes) unless event.changes.to_h.empty? + store["status"] = event.destination if event.destination + store["state"].merge!(event.changes) unless event.changes.to_h.empty? store["errors"][event.id] = event.error unless event.error.to_h.empty? - store["events"][event.id] = event.data unless event.data.to_h.empty? + store["events"][event.id] = event.data unless event.data.to_h.empty? save! end def find_event(event_id) return unless (found_event = store.dig("events", event_id))