lib/flapjack/executive.rb in flapjack-0.6.52 vs lib/flapjack/executive.rb in flapjack-0.6.53

- old
+ new

@@ -166,10 +166,10 @@ @redis.hincrby("event_counters:#{@instance_id}", 'failure', 1) @redis.hset('unacknowledged_failures', @event_count, event.id) end event.previous_state = entity_check.state - event.previous_state_duration = Time.now.to_i - entity_check.last_change + event.previous_state_duration = Time.now.to_i - entity_check.last_change.to_i @logger.info("No previous state for event #{event.id}") if event.previous_state.nil? # If there is a state change, update record with: the time, the new state if event.state != event.previous_state entity_check.update_state(event.state, :timestamp => timestamp,