Sha256: 0b6595980d6eac60c6b79c77d26f3c266c5ad707938dcdc77113cf0eceae40f7

Contents?: true

Size: 313 Bytes

Versions: 31

Compression:

Stored size: 313 Bytes

Contents

module PatronusFati::DataObservers
  class AlertObserver
    include DataMapper::Observer

    observe PatronusFati::DataModels::Alert

    after :save do
      [src_mac, dst_mac, other_mac].uniq.map(&:update_cached_counts!)
      PatronusFati.event_handler.event(:alert, :new, self.full_state)
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
patronus_fati-0.8.10 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.9 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.8 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.7 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.6 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.5 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.4 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.3 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.2 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.1 lib/patronus_fati/data_observers/alert_observer.rb
patronus_fati-0.8.0 lib/patronus_fati/data_observers/alert_observer.rb