lib/sensu/server/process.rb
def update_event_registry(event)
        client_name = event[:client][:name]
        if event[:check][:status] != 0 || (event[:action] == :flapping && event[:check][:force_resolve] != true)
          @redis.hset("events:#{client_name}", event[:check][:name], Sensu::JSON.dump(event)) do
            yield(true)
          end
        elsif event[:action] == :resolve &&
            (event[:check][:auto_resolve] != false || event[:check][:force_resolve]) ||
            (event[:action] == :flapping && event[:check][:force_resolve])
          @redis.hdel("events:#{client_name}", event[:check][:name]) do
            yield(true)
          end
        elsif event[:check][:type] == METRIC_CHECK_TYPE
          yield(true)
        else
          yield(false)
        end
      end
# Update the event registry, stored in Redis. This method
# determines if event data warrants in the creation or update of
# event data in the registry. If a check `:status` is not
# `0`, or it has been flapping, an event is created/updated in
# the registry. If the event `:action` is `:resolve`, the event
# is removed (resolved) from the registry. If the previous
# conditions are not met and check `:type` is `metric`, the
# registry is not updated, but further event processing is
# required (`yield(true)`). JSON serialization is used when
# storing data in the registry.
#
# @param event [Hash]
# @yield callback [event] callback/block called after the event
#   registry has been updated.
# @yieldparam process [TrueClass, FalseClass] indicating if the
#   event requires further processing.
Update the event registry, stored in Redis. This method
determines if event data warrants in the creation or update of
event data in the registry. If a check `:status` is not
`0`, or it has been flapping, an event is created/updated in
the registry. If the event `:action` is `:resolve`, the event
is removed (resolved) from the registry.
Update the event registry stored in Redis . This method determines if event data warrants in the creation or update of event data in the registry . If a check ` : status ` is not ` 0 ` or it has been flapping an event is created / updated in the registry . If the event ` : action ` is ` : resolve ` the event is removed ( resolved ) from the registry .
def update_event_registry(event)
        client_name = event[:client][:name]
        if event[:check][:status] != 0 || (event[:action] == :flapping && event[:check][:force_resolve] != true)
          @redis.hset("events:#{client_name}", event[:check][:name], Sensu::JSON.dump(event)) do
            yield(true)
          end
        elsif event[:action] == :resolve &&
            (event[:check][:auto_resolve] != false || event[:check][:force_resolve]) ||
            (event[:action] == :flapping && event[:check][:force_resolve])
          @redis.hdel("events:#{client_name}", event[:check][:name]) do
            yield(true)
          end
        elsif event[:check][:type] == METRIC_CHECK_TYPE
          yield(true)
        else
          yield(false)
        end
      end
def update_event_registry ( event ) client_name = event [ :client ] [ :name ] if event [ :check ] [ :status ] != 0 || ( event [ :action ] == :flapping && event [ :check ] [ :force_resolve ] != true ) @redis . hset ( "events:#{client_name}" , event [ :check ] [ :name ] , Sensu :: JSON . dump ( event ) ) do yield ( true ) end elsif event [ :action ] == :resolve && ( event [ :check ] [ :auto_resolve ] != false || event [ :check ] [ :force_resolve ] ) || ( event [ :action ] == :flapping && event [ :check ] [ :force_resolve ] ) @redis . hdel ( "events:#{client_name}" , event [ :check ] [ :name ] ) do yield ( true ) end elsif event [ :check ] [ :type ] == METRIC_CHECK_TYPE yield ( true ) else yield ( false ) end end
Update the event registry, stored in Redis.
Update the event registry stored in Redis .
event
None
]
callback  callback/block called after the event registry has been updated.
callback callback / block called after the event registry has been updated .
process
indicating if the event requires further processing.
indicating if the event requires further processing .